0s autopkgtest [21:00:27]: starting date and time: 2026-01-22 21:00:27+0000 0s autopkgtest [21:00:27]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [21:00:27]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.ckrhiajv/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-arm64 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-15@sto01-arm64-17.secgroup --name adt-resolute-arm64-pystac-20260122-210027-juju-7f2275-prod-proposed-migration-environment-15-c13803da-4722-447d-9b88-2a279a5c6445 --image adt/ubuntu-resolute-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --net-id=net_prod-autopkgtest-workers-arm64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 3s Creating nova instance adt-resolute-arm64-pystac-20260122-210027-juju-7f2275-prod-proposed-migration-environment-15-c13803da-4722-447d-9b88-2a279a5c6445 from image adt/ubuntu-resolute-arm64-server-20260122.img (UUID ed27afc7-5f46-4e8b-ad73-864280a0ddbb)... 99s autopkgtest [21:02:05]: testbed dpkg architecture: arm64 99s autopkgtest [21:02:05]: testbed apt version: 3.1.12 99s autopkgtest [21:02:06]: @@@@@@@@@@@@@@@@@@@@ test bed setup 99s autopkgtest [21:02:06]: testbed release detected to be: None 100s autopkgtest [21:02:07]: updating testbed package index (apt update) 100s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 100s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 100s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 101s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 101s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [2820 B] 101s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [81.6 kB] 101s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [22.2 kB] 101s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1011 kB] 101s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 Packages [101 kB] 101s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 c-n-f Metadata [3424 B] 101s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/restricted arm64 Packages [7876 B] 101s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/restricted arm64 c-n-f Metadata [304 B] 101s Get:13 http://ftpmaster.internal/ubuntu resolute-proposed/universe arm64 Packages [727 kB] 102s Get:14 http://ftpmaster.internal/ubuntu resolute-proposed/universe arm64 c-n-f Metadata [18.1 kB] 102s Get:15 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse arm64 Packages [7156 B] 102s Get:16 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse arm64 c-n-f Metadata [332 B] 105s Fetched 2107 kB in 2s (1055 kB/s) 105s Reading package lists... 107s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 107s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 107s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 107s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 108s Reading package lists... 108s Reading package lists... 108s Building dependency tree... 108s Reading state information... 109s Calculating upgrade... 109s The following packages were automatically installed and are no longer required: 109s python3.13 python3.13-minimal 109s Use 'sudo apt autoremove' to remove them. 109s The following NEW packages will be installed: 109s libpython3.14-minimal libpython3.14-stdlib python3.14 python3.14-minimal 109s The following packages will be upgraded: 109s libplymouth5 libpython3-stdlib plymouth plymouth-theme-ubuntu-text python3 109s python3-gdbm python3-minimal 109s 7 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. 109s Need to get 6993 kB of archives. 109s After this operation, 26.0 MB of additional disk space will be used. 109s Get:1 http://ftpmaster.internal/ubuntu resolute/main arm64 libpython3.14-minimal arm64 3.14.2-1 [917 kB] 109s Get:2 http://ftpmaster.internal/ubuntu resolute/main arm64 python3.14-minimal arm64 3.14.2-1 [2548 kB] 110s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 python3-gdbm arm64 3.14.2-1 [11.1 kB] 110s Get:4 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 python3-minimal arm64 3.14.2-1 [28.2 kB] 111s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 python3 arm64 3.14.2-1 [22.9 kB] 111s Get:6 http://ftpmaster.internal/ubuntu resolute/main arm64 libpython3.14-stdlib arm64 3.14.2-1 [2351 kB] 112s Get:7 http://ftpmaster.internal/ubuntu resolute/main arm64 python3.14 arm64 3.14.2-1 [816 kB] 112s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 libpython3-stdlib arm64 3.14.2-1 [10.9 kB] 112s Get:9 http://ftpmaster.internal/ubuntu resolute/main arm64 libplymouth5 arm64 24.004.60+git20250831.4a3c171d-0ubuntu4 [141 kB] 112s Get:10 http://ftpmaster.internal/ubuntu resolute/main arm64 plymouth-theme-ubuntu-text arm64 24.004.60+git20250831.4a3c171d-0ubuntu4 [10.0 kB] 112s Get:11 http://ftpmaster.internal/ubuntu resolute/main arm64 plymouth arm64 24.004.60+git20250831.4a3c171d-0ubuntu4 [138 kB] 112s dpkg-preconfigure: unable to re-open stdin: No such file or directory 112s Fetched 6993 kB in 3s (2473 kB/s) 112s Selecting previously unselected package libpython3.14-minimal:arm64. 113s (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 ... 135223 files and directories currently installed.) 113s Preparing to unpack .../libpython3.14-minimal_3.14.2-1_arm64.deb ... 113s Unpacking libpython3.14-minimal:arm64 (3.14.2-1) ... 113s Selecting previously unselected package python3.14-minimal. 113s Preparing to unpack .../python3.14-minimal_3.14.2-1_arm64.deb ... 113s Unpacking python3.14-minimal (3.14.2-1) ... 113s Preparing to unpack .../python3-gdbm_3.14.2-1_arm64.deb ... 113s Unpacking python3-gdbm (3.14.2-1) over (3.13.9-1) ... 113s Setting up libpython3.14-minimal:arm64 (3.14.2-1) ... 113s Setting up python3.14-minimal (3.14.2-1) ... 115s (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 ... 135565 files and directories currently installed.) 115s Preparing to unpack .../python3-minimal_3.14.2-1_arm64.deb ... 115s Unpacking python3-minimal (3.14.2-1) over (3.13.7-1) ... 115s Setting up python3-minimal (3.14.2-1) ... 115s (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 ... 135565 files and directories currently installed.) 115s Preparing to unpack .../0-python3_3.14.2-1_arm64.deb ... 115s running python pre-rtupdate hooks for python3.14... 115s Unpacking python3 (3.14.2-1) over (3.13.7-1) ... 115s Selecting previously unselected package libpython3.14-stdlib:arm64. 115s Preparing to unpack .../1-libpython3.14-stdlib_3.14.2-1_arm64.deb ... 115s Unpacking libpython3.14-stdlib:arm64 (3.14.2-1) ... 116s Selecting previously unselected package python3.14. 116s Preparing to unpack .../2-python3.14_3.14.2-1_arm64.deb ... 116s Unpacking python3.14 (3.14.2-1) ... 116s Preparing to unpack .../3-libpython3-stdlib_3.14.2-1_arm64.deb ... 116s Unpacking libpython3-stdlib:arm64 (3.14.2-1) over (3.13.7-1) ... 116s Preparing to unpack .../4-libplymouth5_24.004.60+git20250831.4a3c171d-0ubuntu4_arm64.deb ... 116s Unpacking libplymouth5:arm64 (24.004.60+git20250831.4a3c171d-0ubuntu4) over (24.004.60+git20250831.4a3c171d-0ubuntu3) ... 116s Preparing to unpack .../5-plymouth-theme-ubuntu-text_24.004.60+git20250831.4a3c171d-0ubuntu4_arm64.deb ... 116s Unpacking plymouth-theme-ubuntu-text (24.004.60+git20250831.4a3c171d-0ubuntu4) over (24.004.60+git20250831.4a3c171d-0ubuntu3) ... 116s Preparing to unpack .../6-plymouth_24.004.60+git20250831.4a3c171d-0ubuntu4_arm64.deb ... 116s Unpacking plymouth (24.004.60+git20250831.4a3c171d-0ubuntu4) over (24.004.60+git20250831.4a3c171d-0ubuntu3) ... 116s Setting up libpython3.14-stdlib:arm64 (3.14.2-1) ... 116s Setting up libplymouth5:arm64 (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 116s Setting up python3.14 (3.14.2-1) ... 118s Setting up libpython3-stdlib:arm64 (3.14.2-1) ... 118s Setting up python3-gdbm (3.14.2-1) ... 118s Setting up plymouth (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 118s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 118s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 118s Setting up python3 (3.14.2-1) ... 118s running python rtupdate hooks for python3.14... 118s running python post-rtupdate hooks for python3.14... 119s Processing triggers for libc-bin (2.42-2ubuntu4) ... 119s Processing triggers for systemd (259-1ubuntu2) ... 119s Processing triggers for man-db (2.13.1-1) ... 120s Processing triggers for initramfs-tools (0.150ubuntu7) ... 120s update-initramfs: Generating /boot/initrd.img-6.18.0-9-generic 140s System running in EFI mode, skipping. 140s Setting up plymouth-theme-ubuntu-text (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 140s Processing triggers for initramfs-tools (0.150ubuntu7) ... 140s update-initramfs: Generating /boot/initrd.img-6.18.0-9-generic 158s System running in EFI mode, skipping. 158s autopkgtest [21:03:05]: upgrading testbed (apt dist-upgrade and autopurge) 158s Reading package lists... 159s Building dependency tree... 159s Reading state information... 159s Calculating upgrade... 159s The following packages were automatically installed and are no longer required: 159s python3.13 python3.13-minimal 159s Use 'sudo apt autoremove' to remove them. 159s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 160s Reading package lists... 160s Building dependency tree... 160s Reading state information... 160s Solving dependencies... 160s The following packages will be REMOVED: 160s python3.13* python3.13-minimal* 161s 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. 161s After this operation, 7766 kB disk space will be freed. 161s (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 ... 135995 files and directories currently installed.) 161s Removing python3.13 (3.13.11-1) ... 161s Removing python3.13-minimal (3.13.11-1) ... 162s Processing triggers for man-db (2.13.1-1) ... 163s Processing triggers for systemd (259-1ubuntu2) ... 163s (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 ... 135968 files and directories currently installed.) 163s Purging configuration files for python3.13-minimal (3.13.11-1) ... 163s autopkgtest [21:03:10]: rebooting testbed after setup commands that affected boot 270s autopkgtest [21:04:57]: testbed running kernel: Linux 6.18.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 12 16:41:39 UTC 2026 277s autopkgtest [21:05:04]: @@@@@@@@@@@@@@@@@@@@ apt-source pystac 284s Get:1 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (dsc) [3523 B] 284s Get:2 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (tar) [2455 kB] 284s Get:3 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (diff) [27.7 kB] 284s gpgv: Signature made Sat Jan 10 12:09:05 2026 UTC 284s gpgv: using RSA key 3B70F209A5FFD68903C472C5EBF48AB2578F9812 284s gpgv: issuer "antonio.valentino@tiscali.it" 284s gpgv: Can't check signature: No public key 284s dpkg-source: warning: cannot verify inline signature for ./pystac_1.14.3-1.dsc: no acceptable signature found 284s autopkgtest [21:05:11]: testing package pystac version 1.14.3-1 286s autopkgtest [21:05:13]: build not needed 302s autopkgtest [21:05:29]: test pybuild-autopkgtest: preparing testbed 303s Reading package lists... 303s Building dependency tree... 303s Reading state information... 303s Solving dependencies... 304s The following NEW packages will be installed: 304s autoconf automake autopoint autotools-dev build-essential cpp cpp-15 304s cpp-15-aarch64-linux-gnu cpp-aarch64-linux-gnu debhelper debugedit 304s dh-autoreconf dh-python dh-strip-nondeterminism docutils-common dwz 304s fontconfig-config fonts-dejavu-core fonts-dejavu-mono fonts-mathjax g++ 304s g++-15 g++-15-aarch64-linux-gnu g++-aarch64-linux-gnu gcc gcc-15 304s gcc-15-aarch64-linux-gnu gcc-aarch64-linux-gnu gdal-data gdal-plugins 304s gettext intltool-debian libabsl20240722 libaec0 libaom3 libarchive-zip-perl 304s libarmadillo14 libarpack2t64 libasan8 libavif16 libblas3 libblosc1 libcc1-0 304s libcfitsio10t64 libdav1d7 libde265-0 libdebhelper-perl libdeflate0 304s libfile-stripnondeterminism-perl libfontconfig1 libfreexl1 libfyba0t64 304s libgav1-2 libgcc-15-dev libgdal36 libgeos-c1t64 libgeos3.14.1 libgeotiff5 304s libgfortran5 libgif7 libgomp1 libgpgmepp6t64 libhdf4-0-alt libhdf5-310 304s libhdf5-hl-310 libheif-plugin-aomdec libheif-plugin-libde265 libheif1 304s libhwasan0 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8 libjs-mathjax 304s libjson-perl libkmlbase1t64 libkmldom1t64 libkmlengine1t64 liblapack3 304s liblcms2-2 liblerc4 liblsan0 libltdl7 liblua5.4-0 libminizip1t64 libmpc3 304s libmysqlclient24 libnetcdf22 libnorm1t64 libodbc2 libodbcinst2 libogdi4.1 304s libopenjp2-7 libpgm-5.3-0t64 libpoppler147 libpq5 libproj25 libqhull-r8.0 304s librttopo1 libsharpyuv0 libsnappy1v5 libsodium23 libspatialite8t64 304s libstdc++-15-dev libsz2 libtiff6 libtool libtsan2 libubsan1 liburiparser1 304s libwebp7 libxerces-c3.2t64 libyuv0 libzmq5 m4 mysql-common 304s node-fortawesome-fontawesome-free pandoc pandoc-data po-debconf proj-data 304s pybuild-plugin-autopkgtest pybuild-plugin-pyproject python-pystac-doc 304s python-tinycss2-common python3-accessible-pygments python3-affine 304s python3-alabaster python3-all python3-anyio python3-astroid 304s python3-asttokens python3-bleach python3-bs4 python3-build python3-click 304s python3-click-plugins python3-cligj python3-colorama python3-decorator 304s python3-defusedxml python3-docutils python3-executing python3-fastjsonschema 304s python3-h11 python3-html5lib python3-imagesize python3-iniconfig 304s python3-installer python3-ipython python3-jedi python3-jupyter-client 304s python3-jupyter-core python3-jupyterlab-pygments python3-livereload 304s python3-matplotlib-inline python3-mistune python3-multidict python3-nbclient 304s python3-nbconvert python3-nbformat python3-nbsphinx python3-numpy 304s python3-numpy-dev python3-pandocfilters python3-parso python3-platformdirs 304s python3-pluggy python3-prompt-toolkit python3-propcache python3-psutil 304s python3-pure-eval python3-pydata-sphinx-theme python3-pyproject-hooks 304s python3-pystac python3-pytest python3-pytest-mock python3-pytest-recording 304s python3-rasterio python3-requests-mock python3-roman-numerals 304s python3-shapely python3-sniffio python3-snowballstemmer python3-soupsieve 304s python3-sphinx python3-sphinx-autobuild python3-sphinx-design 304s python3-stack-data python3-starlette python3-tinycss2 python3-tornado 304s python3-traitlets python3-typeshed python3-uvicorn python3-uvloop 304s python3-vcr python3-watchfiles python3-wcwidth python3-webencodings 304s python3-websockets python3-wheel python3-wrapt python3-wsproto python3-yarl 304s python3-zmq python3.13 python3.13-minimal sgml-base sphinx-common 304s unixodbc-common xml-core 304s 0 upgraded, 213 newly installed, 0 to remove and 0 not upgraded. 304s Need to get 172 MB of archives. 304s After this operation, 802 MB of additional disk space will be used. 304s Get:1 http://ftpmaster.internal/ubuntu resolute/main arm64 python3.13-minimal arm64 3.13.11-1 [2346 kB] 308s Get:2 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-numpy-dev arm64 1:2.3.5+ds-3 [366 kB] 308s Get:3 http://ftpmaster.internal/ubuntu resolute/main arm64 libblas3 arm64 3.12.1-7ubuntu1 [181 kB] 308s Get:4 http://ftpmaster.internal/ubuntu resolute/main arm64 libgfortran5 arm64 15.2.0-11ubuntu1 [450 kB] 309s Get:5 http://ftpmaster.internal/ubuntu resolute/main arm64 liblapack3 arm64 3.12.1-7ubuntu1 [2299 kB] 312s Get:6 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-numpy arm64 1:2.3.5+ds-3 [4569 kB] 318s Get:7 http://ftpmaster.internal/ubuntu resolute/main arm64 python3.13 arm64 3.13.11-1 [758 kB] 319s Get:8 http://ftpmaster.internal/ubuntu resolute/main arm64 m4 arm64 1.4.20-2 [213 kB] 319s Get:9 http://ftpmaster.internal/ubuntu resolute/main arm64 autoconf all 2.72-3.1ubuntu1 [384 kB] 319s Get:10 http://ftpmaster.internal/ubuntu resolute/main arm64 autotools-dev all 20240727.1 [43.4 kB] 319s Get:11 http://ftpmaster.internal/ubuntu resolute/main arm64 automake all 1:1.18.1-3build1 [582 kB] 319s Get:12 http://ftpmaster.internal/ubuntu resolute/main arm64 autopoint all 0.23.2-1 [620 kB] 320s Get:13 http://ftpmaster.internal/ubuntu resolute/main arm64 libisl23 arm64 0.27-1build1 [676 kB] 321s Get:14 http://ftpmaster.internal/ubuntu resolute/main arm64 libmpc3 arm64 1.3.1-2 [55.6 kB] 321s Get:15 http://ftpmaster.internal/ubuntu resolute/main arm64 cpp-15-aarch64-linux-gnu arm64 15.2.0-11ubuntu1 [11.7 MB] 328s Get:16 http://ftpmaster.internal/ubuntu resolute/main arm64 cpp-15 arm64 15.2.0-11ubuntu1 [1030 B] 328s Get:17 http://ftpmaster.internal/ubuntu resolute/main arm64 cpp-aarch64-linux-gnu arm64 4:15.2.0-4ubuntu1 [5736 B] 328s Get:18 http://ftpmaster.internal/ubuntu resolute/main arm64 cpp arm64 4:15.2.0-4ubuntu1 [22.4 kB] 328s Get:19 http://ftpmaster.internal/ubuntu resolute/main arm64 libcc1-0 arm64 15.2.0-11ubuntu1 [49.0 kB] 328s Get:20 http://ftpmaster.internal/ubuntu resolute/main arm64 libgomp1 arm64 15.2.0-11ubuntu1 [147 kB] 328s Get:21 http://ftpmaster.internal/ubuntu resolute/main arm64 libitm1 arm64 15.2.0-11ubuntu1 [28.0 kB] 328s Get:22 http://ftpmaster.internal/ubuntu resolute/main arm64 libasan8 arm64 15.2.0-11ubuntu1 [2920 kB] 329s Get:23 http://ftpmaster.internal/ubuntu resolute/main arm64 liblsan0 arm64 15.2.0-11ubuntu1 [1316 kB] 330s Get:24 http://ftpmaster.internal/ubuntu resolute/main arm64 libtsan2 arm64 15.2.0-11ubuntu1 [2690 kB] 331s Get:25 http://ftpmaster.internal/ubuntu resolute/main arm64 libubsan1 arm64 15.2.0-11ubuntu1 [1176 kB] 332s Get:26 http://ftpmaster.internal/ubuntu resolute/main arm64 libhwasan0 arm64 15.2.0-11ubuntu1 [1638 kB] 332s Get:27 http://ftpmaster.internal/ubuntu resolute/main arm64 libgcc-15-dev arm64 15.2.0-11ubuntu1 [2600 kB] 333s Get:28 http://ftpmaster.internal/ubuntu resolute/main arm64 gcc-15-aarch64-linux-gnu arm64 15.2.0-11ubuntu1 [23.1 MB] 343s Get:29 http://ftpmaster.internal/ubuntu resolute/main arm64 gcc-15 arm64 15.2.0-11ubuntu1 [517 kB] 343s Get:30 http://ftpmaster.internal/ubuntu resolute/main arm64 gcc-aarch64-linux-gnu arm64 4:15.2.0-4ubuntu1 [1206 B] 343s Get:31 http://ftpmaster.internal/ubuntu resolute/main arm64 gcc arm64 4:15.2.0-4ubuntu1 [5016 B] 343s Get:32 http://ftpmaster.internal/ubuntu resolute/main arm64 libstdc++-15-dev arm64 15.2.0-11ubuntu1 [2547 kB] 344s Get:33 http://ftpmaster.internal/ubuntu resolute/main arm64 g++-15-aarch64-linux-gnu arm64 15.2.0-11ubuntu1 [13.2 MB] 349s Get:34 http://ftpmaster.internal/ubuntu resolute/main arm64 g++-15 arm64 15.2.0-11ubuntu1 [24.6 kB] 349s Get:35 http://ftpmaster.internal/ubuntu resolute/main arm64 g++-aarch64-linux-gnu arm64 4:15.2.0-4ubuntu1 [956 B] 349s Get:36 http://ftpmaster.internal/ubuntu resolute/main arm64 g++ arm64 4:15.2.0-4ubuntu1 [1080 B] 349s Get:37 http://ftpmaster.internal/ubuntu resolute/main arm64 build-essential arm64 12.12ubuntu2 [5254 B] 349s Get:38 http://ftpmaster.internal/ubuntu resolute/main arm64 libdebhelper-perl all 13.28ubuntu1 [97.4 kB] 349s Get:39 http://ftpmaster.internal/ubuntu resolute/main arm64 libtool all 2.5.4-9 [169 kB] 349s Get:40 http://ftpmaster.internal/ubuntu resolute/main arm64 dh-autoreconf all 21 [12.5 kB] 349s Get:41 http://ftpmaster.internal/ubuntu resolute/main arm64 libarchive-zip-perl all 1.68-1 [90.2 kB] 350s Get:42 http://ftpmaster.internal/ubuntu resolute/main arm64 libfile-stripnondeterminism-perl all 1.15.0-1build1 [20.6 kB] 350s Get:43 http://ftpmaster.internal/ubuntu resolute/main arm64 dh-strip-nondeterminism all 1.15.0-1build1 [5110 B] 350s Get:44 http://ftpmaster.internal/ubuntu resolute/main arm64 debugedit arm64 1:5.2-3 [49.1 kB] 350s Get:45 http://ftpmaster.internal/ubuntu resolute/main arm64 dwz arm64 0.16-2 [113 kB] 350s Get:46 http://ftpmaster.internal/ubuntu resolute/main arm64 gettext arm64 0.23.2-1 [998 kB] 350s Get:47 http://ftpmaster.internal/ubuntu resolute/main arm64 intltool-debian all 0.35.0+20060710.6build1 [24.1 kB] 350s Get:48 http://ftpmaster.internal/ubuntu resolute/main arm64 po-debconf all 1.0.22 [215 kB] 350s Get:49 http://ftpmaster.internal/ubuntu resolute/main arm64 debhelper all 13.28ubuntu1 [916 kB] 351s Get:50 http://ftpmaster.internal/ubuntu resolute/universe arm64 dh-python all 7.20251231 [122 kB] 351s Get:51 http://ftpmaster.internal/ubuntu resolute/main arm64 sgml-base all 1.31+nmu1 [11.0 kB] 351s Get:52 http://ftpmaster.internal/ubuntu resolute/main arm64 xml-core all 0.19build1 [20.3 kB] 351s Get:53 http://ftpmaster.internal/ubuntu resolute/main arm64 docutils-common all 0.22.4+dfsg-1 [130 kB] 351s Get:54 http://ftpmaster.internal/ubuntu resolute/main arm64 fonts-dejavu-mono all 2.37-8build1 [502 kB] 351s Get:55 http://ftpmaster.internal/ubuntu resolute/main arm64 fonts-dejavu-core all 2.37-8build1 [834 kB] 351s Get:56 http://ftpmaster.internal/ubuntu resolute/main arm64 fontconfig-config arm64 2.15.0-2.4ubuntu1 [38.2 kB] 351s Get:57 http://ftpmaster.internal/ubuntu resolute/main arm64 fonts-mathjax all 2.7.9+dfsg-1build1 [2283 kB] 352s Get:58 http://ftpmaster.internal/ubuntu resolute/universe arm64 gdal-data all 3.12.1+dfsg-1 [278 kB] 352s Get:59 http://ftpmaster.internal/ubuntu resolute/universe arm64 gdal-plugins arm64 3.12.1+dfsg-1 [26.8 kB] 352s Get:60 http://ftpmaster.internal/ubuntu resolute/main arm64 libabsl20240722 arm64 20240722.0-4ubuntu1 [508 kB] 352s Get:61 http://ftpmaster.internal/ubuntu resolute/universe arm64 libaec0 arm64 1.1.4-2 [22.2 kB] 352s Get:62 http://ftpmaster.internal/ubuntu resolute/main arm64 libaom3 arm64 3.13.1-2 [1773 kB] 353s Get:63 http://ftpmaster.internal/ubuntu resolute/universe arm64 libarpack2t64 arm64 3.9.1-6 [94.9 kB] 353s Get:64 http://ftpmaster.internal/ubuntu resolute/universe arm64 libarmadillo14 arm64 1:14.2.3+dfsg-1 [105 kB] 353s Get:65 http://ftpmaster.internal/ubuntu resolute/universe arm64 libdav1d7 arm64 1.5.3-1 [297 kB] 354s Get:66 http://ftpmaster.internal/ubuntu resolute/universe arm64 libgav1-2 arm64 0.20.0-2 [547 kB] 354s Get:67 http://ftpmaster.internal/ubuntu resolute/main arm64 libjpeg-turbo8 arm64 2.1.5-4ubuntu2 [165 kB] 354s Get:68 http://ftpmaster.internal/ubuntu resolute/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 354s Get:69 http://ftpmaster.internal/ubuntu resolute/main arm64 libyuv0 arm64 0.0.1922.20260106-1 [160 kB] 354s Get:70 http://ftpmaster.internal/ubuntu resolute/universe arm64 libavif16 arm64 1.3.0-1ubuntu3 [112 kB] 354s Get:71 http://ftpmaster.internal/ubuntu resolute/main arm64 libsnappy1v5 arm64 1.2.2-2 [30.1 kB] 354s Get:72 http://ftpmaster.internal/ubuntu resolute/universe arm64 libblosc1 arm64 1.21.5+ds-2 [25.9 kB] 354s Get:73 http://ftpmaster.internal/ubuntu resolute/universe arm64 libcfitsio10t64 arm64 4.6.3-1 [517 kB] 354s Get:74 http://ftpmaster.internal/ubuntu resolute/main arm64 libde265-0 arm64 1.0.16-1build1 [148 kB] 354s Get:75 http://ftpmaster.internal/ubuntu resolute/main arm64 libdeflate0 arm64 1.23-2 [46.4 kB] 354s Get:76 http://ftpmaster.internal/ubuntu resolute/main arm64 libfontconfig1 arm64 2.15.0-2.4ubuntu1 [143 kB] 354s Get:77 http://ftpmaster.internal/ubuntu resolute/universe arm64 libfyba0t64 arm64 4.1.1-11build2 [119 kB] 354s Get:78 http://ftpmaster.internal/ubuntu resolute/universe arm64 libminizip1t64 arm64 1:1.3.dfsg+really1.3.1-1ubuntu2 [24.4 kB] 354s Get:79 http://ftpmaster.internal/ubuntu resolute/universe arm64 libfreexl1 arm64 2.0.0-1build3 [42.4 kB] 354s Get:80 http://ftpmaster.internal/ubuntu resolute/universe arm64 libgeos3.14.1 arm64 3.14.1-2 [935 kB] 355s Get:81 http://ftpmaster.internal/ubuntu resolute/universe arm64 libgeos-c1t64 arm64 3.14.1-2 [110 kB] 355s Get:82 http://ftpmaster.internal/ubuntu resolute/universe arm64 proj-data all 9.7.1-1 [7950 kB] 364s Get:83 http://ftpmaster.internal/ubuntu resolute/main arm64 libjbig0 arm64 2.1-6.1ubuntu3 [29.2 kB] 364s Get:84 http://ftpmaster.internal/ubuntu resolute/main arm64 liblerc4 arm64 4.0.0+ds-5ubuntu2 [174 kB] 364s Get:85 http://ftpmaster.internal/ubuntu resolute/main arm64 libsharpyuv0 arm64 1.5.0-0.1build1 [16.7 kB] 364s Get:86 http://ftpmaster.internal/ubuntu resolute/main arm64 libwebp7 arm64 1.5.0-0.1build1 [205 kB] 364s Get:87 http://ftpmaster.internal/ubuntu resolute/main arm64 libtiff6 arm64 4.7.0-3ubuntu3 [196 kB] 364s Get:88 http://ftpmaster.internal/ubuntu resolute/universe arm64 libproj25 arm64 9.7.1-1 [1370 kB] 366s Get:89 http://ftpmaster.internal/ubuntu resolute/universe arm64 libgeotiff5 arm64 1.7.4-1 [58.9 kB] 366s Get:90 http://ftpmaster.internal/ubuntu resolute/main arm64 libgif7 arm64 5.2.2-1ubuntu3 [35.8 kB] 366s Get:91 http://ftpmaster.internal/ubuntu resolute/universe arm64 libsz2 arm64 1.1.4-2 [5258 B] 366s Get:92 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf4-0-alt arm64 4.3.0-1 [271 kB] 366s Get:93 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf5-310 arm64 1.14.5+repack-4 [1286 kB] 368s Get:94 http://ftpmaster.internal/ubuntu resolute/main arm64 libheif-plugin-aomdec arm64 1.21.2-1 [13.9 kB] 368s Get:95 http://ftpmaster.internal/ubuntu resolute/main arm64 libheif-plugin-libde265 arm64 1.21.2-1 [9696 B] 368s Get:96 http://ftpmaster.internal/ubuntu resolute/main arm64 libheif1 arm64 1.21.2-1 [502 kB] 368s Get:97 http://ftpmaster.internal/ubuntu resolute/universe arm64 liburiparser1 arm64 0.9.8+dfsg-2 [36.3 kB] 368s Get:98 http://ftpmaster.internal/ubuntu resolute/universe arm64 libkmlbase1t64 arm64 1.3.0-13 [48.2 kB] 368s Get:99 http://ftpmaster.internal/ubuntu resolute/universe arm64 libkmldom1t64 arm64 1.3.0-13 [143 kB] 368s Get:100 http://ftpmaster.internal/ubuntu resolute/universe arm64 libkmlengine1t64 arm64 1.3.0-13 [68.9 kB] 368s Get:101 http://ftpmaster.internal/ubuntu resolute/main arm64 mysql-common all 5.8+1.1.1ubuntu2 [7002 B] 368s Get:102 http://ftpmaster.internal/ubuntu resolute/main arm64 libmysqlclient24 arm64 8.4.7-0ubuntu3 [1244 kB] 369s Get:103 http://ftpmaster.internal/ubuntu resolute/universe arm64 libhdf5-hl-310 arm64 1.14.5+repack-4 [58.9 kB] 369s Get:104 http://ftpmaster.internal/ubuntu resolute/universe arm64 libnetcdf22 arm64 1:4.9.3-1build1 [555 kB] 370s Get:105 http://ftpmaster.internal/ubuntu resolute/main arm64 libltdl7 arm64 2.5.4-9 [43.3 kB] 370s Get:106 http://ftpmaster.internal/ubuntu resolute/main arm64 libodbc2 arm64 2.3.14-1 [143 kB] 370s Get:107 http://ftpmaster.internal/ubuntu resolute/main arm64 unixodbc-common all 2.3.14-1 [8792 B] 370s Get:108 http://ftpmaster.internal/ubuntu resolute/main arm64 libodbcinst2 arm64 2.3.14-1 [30.6 kB] 370s Get:109 http://ftpmaster.internal/ubuntu resolute/universe arm64 libogdi4.1 arm64 4.1.1+ds-5 [217 kB] 370s Get:110 http://ftpmaster.internal/ubuntu resolute/main arm64 libopenjp2-7 arm64 2.5.4-1 [180 kB] 370s Get:111 http://ftpmaster.internal/ubuntu resolute/main arm64 libgpgmepp6t64 arm64 1.24.2-3ubuntu2 [117 kB] 370s Get:112 http://ftpmaster.internal/ubuntu resolute/main arm64 liblcms2-2 arm64 2.17-1 [170 kB] 370s Get:113 http://ftpmaster.internal/ubuntu resolute/main arm64 libpoppler147 arm64 25.03.0-11.1 [1149 kB] 371s Get:114 http://ftpmaster.internal/ubuntu resolute/main arm64 libpq5 arm64 18.1-2 [151 kB] 371s Get:115 http://ftpmaster.internal/ubuntu resolute/universe arm64 libqhull-r8.0 arm64 2020.2-8 [191 kB] 371s Get:116 http://ftpmaster.internal/ubuntu resolute/universe arm64 librttopo1 arm64 1.1.0-4 [190 kB] 371s Get:117 http://ftpmaster.internal/ubuntu resolute/universe arm64 libspatialite8t64 arm64 5.1.0-3ubuntu1 [1816 kB] 373s Get:118 http://ftpmaster.internal/ubuntu resolute/universe arm64 libxerces-c3.2t64 arm64 3.2.4+debian-1.3build2 [913 kB] 374s Get:119 http://ftpmaster.internal/ubuntu resolute/universe arm64 libgdal36 arm64 3.10.3+dfsg-1build3 [8835 kB] 385s Get:120 http://ftpmaster.internal/ubuntu resolute/main arm64 libjson-perl all 4.10000-1 [81.9 kB] 385s Get:121 http://ftpmaster.internal/ubuntu resolute/main arm64 liblua5.4-0 arm64 5.4.8-1 [171 kB] 385s Get:122 http://ftpmaster.internal/ubuntu resolute/universe arm64 libnorm1t64 arm64 1.5.9+dfsg-4 [152 kB] 385s Get:123 http://ftpmaster.internal/ubuntu resolute/universe arm64 libpgm-5.3-0t64 arm64 5.3.128~dfsg-2.1build2 [161 kB] 385s Get:124 http://ftpmaster.internal/ubuntu resolute/main arm64 libsodium23 arm64 1.0.18-2 [120 kB] 385s Get:125 http://ftpmaster.internal/ubuntu resolute/universe arm64 libzmq5 arm64 4.3.5-1build3 [244 kB] 385s Get:126 http://ftpmaster.internal/ubuntu resolute/universe arm64 node-fortawesome-fontawesome-free all 6.7.2+ds1-1 [1653 kB] 388s Get:127 http://ftpmaster.internal/ubuntu resolute/universe arm64 pandoc-data all 3.1.11.1-3build1 [78.8 kB] 388s Get:128 http://ftpmaster.internal/ubuntu resolute/universe arm64 pandoc arm64 3.1.11.1+ds-4 [28.0 MB] 420s Get:129 http://ftpmaster.internal/ubuntu resolute/universe arm64 pybuild-plugin-autopkgtest all 7.20251231 [1748 B] 420s Get:130 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 420s Get:131 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-wheel all 0.46.1-2 [22.1 kB] 420s Get:132 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-build all 1.2.2-5 [30.9 kB] 421s Get:133 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 421s Get:134 http://ftpmaster.internal/ubuntu resolute/universe arm64 pybuild-plugin-pyproject all 7.20251231 [1714 B] 421s Get:135 http://ftpmaster.internal/ubuntu resolute/universe arm64 python-pystac-doc all 1.14.3-1 [2276 kB] 422s Get:136 http://ftpmaster.internal/ubuntu resolute/universe arm64 python-tinycss2-common all 1.5.1-1 [47.3 kB] 422s Get:137 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-accessible-pygments all 0.0.5-2build1 [790 kB] 423s Get:138 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-affine all 2.4.0-2 [14.0 kB] 423s Get:139 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 python3-all arm64 3.14.2-1 [888 B] 423s Get:140 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-sniffio all 1.3.1-1 [7262 B] 423s Get:141 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-anyio all 4.11.0-3 [72.6 kB] 423s Get:142 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-astroid all 4.0.2-1ubuntu1 [172 kB] 423s Get:143 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-asttokens all 3.0.1-1 [20.7 kB] 423s Get:144 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-webencodings all 0.5.1-5build1 [11.7 kB] 423s Get:145 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-html5lib all 1.2-3 [90.6 kB] 423s Get:146 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-bleach all 6.3.0-1 [44.2 kB] 423s Get:147 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-soupsieve all 2.8.1-1 [33.7 kB] 423s Get:148 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-bs4 all 4.14.3-2build1 [84.8 kB] 423s Get:149 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-click all 8.2.0+0.really.8.1.8-1build1 [80.2 kB] 423s Get:150 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-click-plugins all 1.1.1-5 [9760 B] 423s Get:151 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-cligj all 0.7.2-3 [8006 B] 423s Get:152 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-colorama all 0.4.6-4build1 [32.2 kB] 423s Get:153 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-decorator all 5.2.1-2 [28.1 kB] 423s Get:154 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-defusedxml all 0.7.1-3build1 [42.4 kB] 423s Get:155 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-roman-numerals all 4.1.0-1 [8660 B] 423s Get:156 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-docutils all 0.22.4+dfsg-1 [439 kB] 423s Get:157 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-executing all 2.2.1-0.1 [26.2 kB] 423s Get:158 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-fastjsonschema all 2.21.1-1 [20.4 kB] 423s Get:159 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-h11 all 0.14.0-1.1 [51.6 kB] 423s Get:160 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-imagesize all 1.4.1-1build1 [6900 B] 423s Get:161 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-iniconfig all 2.1.0-2 [6962 B] 423s Get:162 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-parso all 0.8.5-1 [68.0 kB] 423s Get:163 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-typeshed all 0.0~git20241223.ea91db2-4 [1554 kB] 424s Get:164 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-jedi all 0.19.1+ds1-1build1 [694 kB] 424s Get:165 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-traitlets all 5.14.3+really5.14.3-2 [71.7 kB] 424s Get:166 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-matplotlib-inline all 0.2.1-1 [9462 B] 424s Get:167 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-wcwidth all 0.2.14+dfsg1-1build1 [26.5 kB] 424s Get:168 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-prompt-toolkit all 3.0.52-2 [258 kB] 424s Get:169 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-pure-eval all 0.2.3-1 [11.4 kB] 424s Get:170 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-stack-data all 0.6.3-3 [22.2 kB] 424s Get:171 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-ipython all 8.35.0-2 [575 kB] 424s Get:172 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-platformdirs all 4.5.1-1 [17.1 kB] 424s Get:173 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-jupyter-core all 5.9.1-1 [28.9 kB] 424s Get:174 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-psutil arm64 7.1.0-1ubuntu1 [191 kB] 424s Get:175 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-tornado arm64 6.5.4-0.1 [306 kB] 424s Get:176 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-zmq arm64 27.1.0-1 [231 kB] 424s Get:177 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-jupyter-client all 8.7.0-1 [78.5 kB] 424s Get:178 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-jupyterlab-pygments all 0.2.2-3build1 [6188 B] 424s Get:179 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-livereload all 2.7.1-0.1 [22.7 kB] 424s Get:180 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-mistune all 3.1.4-1 [35.0 kB] 424s Get:181 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-multidict arm64 6.4.3-1build1 [67.4 kB] 425s Get:182 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-nbformat all 5.10.4-1 [39.2 kB] 425s Get:183 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-nbclient all 0.10.4-1 [22.6 kB] 425s Get:184 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-tinycss2 all 1.5.1-1 [23.3 kB] 425s Get:185 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-pandocfilters all 1.5.1-1 [23.6 kB] 425s Get:186 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-nbconvert all 7.16.6-1 [140 kB] 425s Get:187 http://ftpmaster.internal/ubuntu resolute/main arm64 sphinx-common all 8.2.3-12 [657 kB] 425s Get:188 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-alabaster all 0.7.16-0.1build1 [18.6 kB] 425s Get:189 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-snowballstemmer all 3.0.1-1 [65.9 kB] 425s Get:190 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-sphinx all 8.2.3-12 [483 kB] 425s Get:191 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-nbsphinx all 0.9.5+ds-1 [41.0 kB] 425s Get:192 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-pluggy all 1.6.0-2 [21.1 kB] 425s Get:193 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-propcache arm64 0.3.1-1build1 [51.8 kB] 425s Get:194 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-pydata-sphinx-theme all 0.16.1+dfsg-5 [944 kB] 425s Get:195 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-pystac all 1.14.3-1 [150 kB] 425s Get:196 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-pytest all 9.0.2-2 [277 kB] 425s Get:197 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-pytest-mock all 3.15.1-1 [11.9 kB] 425s Get:198 http://ftpmaster.internal/ubuntu resolute/main arm64 python3-wrapt arm64 1.17.3-3 [40.1 kB] 425s Get:199 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-yarl arm64 1.22.0-1 [96.2 kB] 425s Get:200 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-vcr all 7.0.0-2 [33.3 kB] 425s Get:201 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-pytest-recording all 0.13.4-1 [15.9 kB] 425s Get:202 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-rasterio arm64 1.4.3-2build2 [1852 kB] 426s Get:203 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-requests-mock all 1.12.1-4 [17.9 kB] 426s Get:204 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-shapely arm64 2.1.2-1ubuntu1 [408 kB] 426s Get:205 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-starlette all 0.50.0-1 [53.0 kB] 426s Get:206 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-uvloop arm64 0.22.1+ds1-2 [791 kB] 427s Get:207 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-wsproto all 1.3.2-1 [21.8 kB] 427s Get:208 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-uvicorn all 0.38.0-1 [45.9 kB] 427s Get:209 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-watchfiles arm64 1.1.1-2 [378 kB] 427s Get:210 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-websockets arm64 15.0.1-1build1 [98.3 kB] 427s Get:211 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-sphinx-autobuild all 2025.08.25-1 [12.0 kB] 427s Get:212 http://ftpmaster.internal/ubuntu resolute/universe arm64 python3-sphinx-design all 0.6.1-2 [894 kB] 427s Get:213 http://ftpmaster.internal/ubuntu resolute/main arm64 libjs-mathjax all 2.7.9+dfsg-1build1 [6017 kB] 431s Fetched 172 MB in 2min 6s (1360 kB/s) 431s Selecting previously unselected package python3.13-minimal. 431s (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 ... 135970 files and directories currently installed.) 431s Preparing to unpack .../000-python3.13-minimal_3.13.11-1_arm64.deb ... 431s Unpacking python3.13-minimal (3.13.11-1) ... 431s Selecting previously unselected package python3-numpy-dev:arm64. 431s Preparing to unpack .../001-python3-numpy-dev_1%3a2.3.5+ds-3_arm64.deb ... 431s Unpacking python3-numpy-dev:arm64 (1:2.3.5+ds-3) ... 431s Selecting previously unselected package libblas3:arm64. 431s Preparing to unpack .../002-libblas3_3.12.1-7ubuntu1_arm64.deb ... 431s Unpacking libblas3:arm64 (3.12.1-7ubuntu1) ... 432s Selecting previously unselected package libgfortran5:arm64. 432s Preparing to unpack .../003-libgfortran5_15.2.0-11ubuntu1_arm64.deb ... 432s Unpacking libgfortran5:arm64 (15.2.0-11ubuntu1) ... 432s Selecting previously unselected package liblapack3:arm64. 432s Preparing to unpack .../004-liblapack3_3.12.1-7ubuntu1_arm64.deb ... 432s Unpacking liblapack3:arm64 (3.12.1-7ubuntu1) ... 432s Selecting previously unselected package python3-numpy. 432s Preparing to unpack .../005-python3-numpy_1%3a2.3.5+ds-3_arm64.deb ... 432s Unpacking python3-numpy (1:2.3.5+ds-3) ... 432s Selecting previously unselected package python3.13. 432s Preparing to unpack .../006-python3.13_3.13.11-1_arm64.deb ... 432s Unpacking python3.13 (3.13.11-1) ... 432s Selecting previously unselected package m4. 432s Preparing to unpack .../007-m4_1.4.20-2_arm64.deb ... 432s Unpacking m4 (1.4.20-2) ... 432s Selecting previously unselected package autoconf. 432s Preparing to unpack .../008-autoconf_2.72-3.1ubuntu1_all.deb ... 432s Unpacking autoconf (2.72-3.1ubuntu1) ... 432s Selecting previously unselected package autotools-dev. 432s Preparing to unpack .../009-autotools-dev_20240727.1_all.deb ... 432s Unpacking autotools-dev (20240727.1) ... 432s Selecting previously unselected package automake. 432s Preparing to unpack .../010-automake_1%3a1.18.1-3build1_all.deb ... 432s Unpacking automake (1:1.18.1-3build1) ... 432s Selecting previously unselected package autopoint. 432s Preparing to unpack .../011-autopoint_0.23.2-1_all.deb ... 432s Unpacking autopoint (0.23.2-1) ... 432s Selecting previously unselected package libisl23:arm64. 432s Preparing to unpack .../012-libisl23_0.27-1build1_arm64.deb ... 432s Unpacking libisl23:arm64 (0.27-1build1) ... 432s Selecting previously unselected package libmpc3:arm64. 432s Preparing to unpack .../013-libmpc3_1.3.1-2_arm64.deb ... 432s Unpacking libmpc3:arm64 (1.3.1-2) ... 432s Selecting previously unselected package cpp-15-aarch64-linux-gnu. 432s Preparing to unpack .../014-cpp-15-aarch64-linux-gnu_15.2.0-11ubuntu1_arm64.deb ... 432s Unpacking cpp-15-aarch64-linux-gnu (15.2.0-11ubuntu1) ... 433s Selecting previously unselected package cpp-15. 433s Preparing to unpack .../015-cpp-15_15.2.0-11ubuntu1_arm64.deb ... 433s Unpacking cpp-15 (15.2.0-11ubuntu1) ... 433s Selecting previously unselected package cpp-aarch64-linux-gnu. 433s Preparing to unpack .../016-cpp-aarch64-linux-gnu_4%3a15.2.0-4ubuntu1_arm64.deb ... 433s Unpacking cpp-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 433s Selecting previously unselected package cpp. 433s Preparing to unpack .../017-cpp_4%3a15.2.0-4ubuntu1_arm64.deb ... 433s Unpacking cpp (4:15.2.0-4ubuntu1) ... 433s Selecting previously unselected package libcc1-0:arm64. 433s Preparing to unpack .../018-libcc1-0_15.2.0-11ubuntu1_arm64.deb ... 433s Unpacking libcc1-0:arm64 (15.2.0-11ubuntu1) ... 433s Selecting previously unselected package libgomp1:arm64. 433s Preparing to unpack .../019-libgomp1_15.2.0-11ubuntu1_arm64.deb ... 433s Unpacking libgomp1:arm64 (15.2.0-11ubuntu1) ... 433s Selecting previously unselected package libitm1:arm64. 433s Preparing to unpack .../020-libitm1_15.2.0-11ubuntu1_arm64.deb ... 433s Unpacking libitm1:arm64 (15.2.0-11ubuntu1) ... 433s Selecting previously unselected package libasan8:arm64. 433s Preparing to unpack .../021-libasan8_15.2.0-11ubuntu1_arm64.deb ... 433s Unpacking libasan8:arm64 (15.2.0-11ubuntu1) ... 433s Selecting previously unselected package liblsan0:arm64. 433s Preparing to unpack .../022-liblsan0_15.2.0-11ubuntu1_arm64.deb ... 433s Unpacking liblsan0:arm64 (15.2.0-11ubuntu1) ... 433s Selecting previously unselected package libtsan2:arm64. 433s Preparing to unpack .../023-libtsan2_15.2.0-11ubuntu1_arm64.deb ... 433s Unpacking libtsan2:arm64 (15.2.0-11ubuntu1) ... 433s Selecting previously unselected package libubsan1:arm64. 433s Preparing to unpack .../024-libubsan1_15.2.0-11ubuntu1_arm64.deb ... 433s Unpacking libubsan1:arm64 (15.2.0-11ubuntu1) ... 433s Selecting previously unselected package libhwasan0:arm64. 434s Preparing to unpack .../025-libhwasan0_15.2.0-11ubuntu1_arm64.deb ... 434s Unpacking libhwasan0:arm64 (15.2.0-11ubuntu1) ... 434s Selecting previously unselected package libgcc-15-dev:arm64. 434s Preparing to unpack .../026-libgcc-15-dev_15.2.0-11ubuntu1_arm64.deb ... 434s Unpacking libgcc-15-dev:arm64 (15.2.0-11ubuntu1) ... 434s Selecting previously unselected package gcc-15-aarch64-linux-gnu. 434s Preparing to unpack .../027-gcc-15-aarch64-linux-gnu_15.2.0-11ubuntu1_arm64.deb ... 434s Unpacking gcc-15-aarch64-linux-gnu (15.2.0-11ubuntu1) ... 434s Selecting previously unselected package gcc-15. 434s Preparing to unpack .../028-gcc-15_15.2.0-11ubuntu1_arm64.deb ... 434s Unpacking gcc-15 (15.2.0-11ubuntu1) ... 434s Selecting previously unselected package gcc-aarch64-linux-gnu. 434s Preparing to unpack .../029-gcc-aarch64-linux-gnu_4%3a15.2.0-4ubuntu1_arm64.deb ... 434s Unpacking gcc-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 435s Selecting previously unselected package gcc. 435s Preparing to unpack .../030-gcc_4%3a15.2.0-4ubuntu1_arm64.deb ... 435s Unpacking gcc (4:15.2.0-4ubuntu1) ... 435s Selecting previously unselected package libstdc++-15-dev:arm64. 435s Preparing to unpack .../031-libstdc++-15-dev_15.2.0-11ubuntu1_arm64.deb ... 435s Unpacking libstdc++-15-dev:arm64 (15.2.0-11ubuntu1) ... 435s Selecting previously unselected package g++-15-aarch64-linux-gnu. 435s Preparing to unpack .../032-g++-15-aarch64-linux-gnu_15.2.0-11ubuntu1_arm64.deb ... 435s Unpacking g++-15-aarch64-linux-gnu (15.2.0-11ubuntu1) ... 435s Selecting previously unselected package g++-15. 435s Preparing to unpack .../033-g++-15_15.2.0-11ubuntu1_arm64.deb ... 435s Unpacking g++-15 (15.2.0-11ubuntu1) ... 435s Selecting previously unselected package g++-aarch64-linux-gnu. 435s Preparing to unpack .../034-g++-aarch64-linux-gnu_4%3a15.2.0-4ubuntu1_arm64.deb ... 435s Unpacking g++-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 435s Selecting previously unselected package g++. 435s Preparing to unpack .../035-g++_4%3a15.2.0-4ubuntu1_arm64.deb ... 435s Unpacking g++ (4:15.2.0-4ubuntu1) ... 435s Selecting previously unselected package build-essential. 435s Preparing to unpack .../036-build-essential_12.12ubuntu2_arm64.deb ... 435s Unpacking build-essential (12.12ubuntu2) ... 435s Selecting previously unselected package libdebhelper-perl. 435s Preparing to unpack .../037-libdebhelper-perl_13.28ubuntu1_all.deb ... 435s Unpacking libdebhelper-perl (13.28ubuntu1) ... 435s Selecting previously unselected package libtool. 435s Preparing to unpack .../038-libtool_2.5.4-9_all.deb ... 435s Unpacking libtool (2.5.4-9) ... 435s Selecting previously unselected package dh-autoreconf. 435s Preparing to unpack .../039-dh-autoreconf_21_all.deb ... 435s Unpacking dh-autoreconf (21) ... 435s Selecting previously unselected package libarchive-zip-perl. 435s Preparing to unpack .../040-libarchive-zip-perl_1.68-1_all.deb ... 435s Unpacking libarchive-zip-perl (1.68-1) ... 435s Selecting previously unselected package libfile-stripnondeterminism-perl. 436s Preparing to unpack .../041-libfile-stripnondeterminism-perl_1.15.0-1build1_all.deb ... 436s Unpacking libfile-stripnondeterminism-perl (1.15.0-1build1) ... 436s Selecting previously unselected package dh-strip-nondeterminism. 436s Preparing to unpack .../042-dh-strip-nondeterminism_1.15.0-1build1_all.deb ... 436s Unpacking dh-strip-nondeterminism (1.15.0-1build1) ... 436s Selecting previously unselected package debugedit. 436s Preparing to unpack .../043-debugedit_1%3a5.2-3_arm64.deb ... 436s Unpacking debugedit (1:5.2-3) ... 436s Selecting previously unselected package dwz. 436s Preparing to unpack .../044-dwz_0.16-2_arm64.deb ... 436s Unpacking dwz (0.16-2) ... 436s Selecting previously unselected package gettext. 436s Preparing to unpack .../045-gettext_0.23.2-1_arm64.deb ... 436s Unpacking gettext (0.23.2-1) ... 436s Selecting previously unselected package intltool-debian. 436s Preparing to unpack .../046-intltool-debian_0.35.0+20060710.6build1_all.deb ... 436s Unpacking intltool-debian (0.35.0+20060710.6build1) ... 436s Selecting previously unselected package po-debconf. 436s Preparing to unpack .../047-po-debconf_1.0.22_all.deb ... 436s Unpacking po-debconf (1.0.22) ... 436s Selecting previously unselected package debhelper. 436s Preparing to unpack .../048-debhelper_13.28ubuntu1_all.deb ... 436s Unpacking debhelper (13.28ubuntu1) ... 436s Selecting previously unselected package dh-python. 436s Preparing to unpack .../049-dh-python_7.20251231_all.deb ... 436s Unpacking dh-python (7.20251231) ... 436s Selecting previously unselected package sgml-base. 436s Preparing to unpack .../050-sgml-base_1.31+nmu1_all.deb ... 436s Unpacking sgml-base (1.31+nmu1) ... 436s Selecting previously unselected package xml-core. 436s Preparing to unpack .../051-xml-core_0.19build1_all.deb ... 436s Unpacking xml-core (0.19build1) ... 436s Selecting previously unselected package docutils-common. 436s Preparing to unpack .../052-docutils-common_0.22.4+dfsg-1_all.deb ... 436s Unpacking docutils-common (0.22.4+dfsg-1) ... 436s Selecting previously unselected package fonts-dejavu-mono. 436s Preparing to unpack .../053-fonts-dejavu-mono_2.37-8build1_all.deb ... 436s Unpacking fonts-dejavu-mono (2.37-8build1) ... 436s Selecting previously unselected package fonts-dejavu-core. 436s Preparing to unpack .../054-fonts-dejavu-core_2.37-8build1_all.deb ... 436s Unpacking fonts-dejavu-core (2.37-8build1) ... 437s Selecting previously unselected package fontconfig-config. 437s Preparing to unpack .../055-fontconfig-config_2.15.0-2.4ubuntu1_arm64.deb ... 437s Unpacking fontconfig-config (2.15.0-2.4ubuntu1) ... 437s Selecting previously unselected package fonts-mathjax. 437s Preparing to unpack .../056-fonts-mathjax_2.7.9+dfsg-1build1_all.deb ... 437s Unpacking fonts-mathjax (2.7.9+dfsg-1build1) ... 437s Selecting previously unselected package gdal-data. 437s Preparing to unpack .../057-gdal-data_3.12.1+dfsg-1_all.deb ... 437s Unpacking gdal-data (3.12.1+dfsg-1) ... 437s Selecting previously unselected package gdal-plugins:arm64. 437s Preparing to unpack .../058-gdal-plugins_3.12.1+dfsg-1_arm64.deb ... 437s Unpacking gdal-plugins:arm64 (3.12.1+dfsg-1) ... 437s Selecting previously unselected package libabsl20240722:arm64. 437s Preparing to unpack .../059-libabsl20240722_20240722.0-4ubuntu1_arm64.deb ... 437s Unpacking libabsl20240722:arm64 (20240722.0-4ubuntu1) ... 438s Selecting previously unselected package libaec0:arm64. 438s Preparing to unpack .../060-libaec0_1.1.4-2_arm64.deb ... 438s Unpacking libaec0:arm64 (1.1.4-2) ... 438s Selecting previously unselected package libaom3:arm64. 438s Preparing to unpack .../061-libaom3_3.13.1-2_arm64.deb ... 438s Unpacking libaom3:arm64 (3.13.1-2) ... 438s Selecting previously unselected package libarpack2t64:arm64. 438s Preparing to unpack .../062-libarpack2t64_3.9.1-6_arm64.deb ... 438s Unpacking libarpack2t64:arm64 (3.9.1-6) ... 438s Selecting previously unselected package libarmadillo14. 438s Preparing to unpack .../063-libarmadillo14_1%3a14.2.3+dfsg-1_arm64.deb ... 438s Unpacking libarmadillo14 (1:14.2.3+dfsg-1) ... 438s Selecting previously unselected package libdav1d7:arm64. 438s Preparing to unpack .../064-libdav1d7_1.5.3-1_arm64.deb ... 438s Unpacking libdav1d7:arm64 (1.5.3-1) ... 438s Selecting previously unselected package libgav1-2:arm64. 438s Preparing to unpack .../065-libgav1-2_0.20.0-2_arm64.deb ... 438s Unpacking libgav1-2:arm64 (0.20.0-2) ... 438s Selecting previously unselected package libjpeg-turbo8:arm64. 438s Preparing to unpack .../066-libjpeg-turbo8_2.1.5-4ubuntu2_arm64.deb ... 438s Unpacking libjpeg-turbo8:arm64 (2.1.5-4ubuntu2) ... 438s Selecting previously unselected package libjpeg8:arm64. 438s Preparing to unpack .../067-libjpeg8_8c-2ubuntu11_arm64.deb ... 438s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 438s Selecting previously unselected package libyuv0:arm64. 438s Preparing to unpack .../068-libyuv0_0.0.1922.20260106-1_arm64.deb ... 438s Unpacking libyuv0:arm64 (0.0.1922.20260106-1) ... 438s Selecting previously unselected package libavif16:arm64. 438s Preparing to unpack .../069-libavif16_1.3.0-1ubuntu3_arm64.deb ... 438s Unpacking libavif16:arm64 (1.3.0-1ubuntu3) ... 438s Selecting previously unselected package libsnappy1v5:arm64. 438s Preparing to unpack .../070-libsnappy1v5_1.2.2-2_arm64.deb ... 438s Unpacking libsnappy1v5:arm64 (1.2.2-2) ... 438s Selecting previously unselected package libblosc1:arm64. 438s Preparing to unpack .../071-libblosc1_1.21.5+ds-2_arm64.deb ... 438s Unpacking libblosc1:arm64 (1.21.5+ds-2) ... 438s Selecting previously unselected package libcfitsio10t64:arm64. 438s Preparing to unpack .../072-libcfitsio10t64_4.6.3-1_arm64.deb ... 438s Unpacking libcfitsio10t64:arm64 (4.6.3-1) ... 438s Selecting previously unselected package libde265-0:arm64. 438s Preparing to unpack .../073-libde265-0_1.0.16-1build1_arm64.deb ... 438s Unpacking libde265-0:arm64 (1.0.16-1build1) ... 438s Selecting previously unselected package libdeflate0:arm64. 438s Preparing to unpack .../074-libdeflate0_1.23-2_arm64.deb ... 438s Unpacking libdeflate0:arm64 (1.23-2) ... 438s Selecting previously unselected package libfontconfig1:arm64. 438s Preparing to unpack .../075-libfontconfig1_2.15.0-2.4ubuntu1_arm64.deb ... 438s Unpacking libfontconfig1:arm64 (2.15.0-2.4ubuntu1) ... 438s Selecting previously unselected package libfyba0t64:arm64. 438s Preparing to unpack .../076-libfyba0t64_4.1.1-11build2_arm64.deb ... 438s Unpacking libfyba0t64:arm64 (4.1.1-11build2) ... 438s Selecting previously unselected package libminizip1t64:arm64. 438s Preparing to unpack .../077-libminizip1t64_1%3a1.3.dfsg+really1.3.1-1ubuntu2_arm64.deb ... 438s Unpacking libminizip1t64:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 438s Selecting previously unselected package libfreexl1:arm64. 438s Preparing to unpack .../078-libfreexl1_2.0.0-1build3_arm64.deb ... 438s Unpacking libfreexl1:arm64 (2.0.0-1build3) ... 438s Selecting previously unselected package libgeos3.14.1:arm64. 438s Preparing to unpack .../079-libgeos3.14.1_3.14.1-2_arm64.deb ... 438s Unpacking libgeos3.14.1:arm64 (3.14.1-2) ... 438s Selecting previously unselected package libgeos-c1t64:arm64. 439s Preparing to unpack .../080-libgeos-c1t64_3.14.1-2_arm64.deb ... 439s Unpacking libgeos-c1t64:arm64 (3.14.1-2) ... 439s Selecting previously unselected package proj-data. 439s Preparing to unpack .../081-proj-data_9.7.1-1_all.deb ... 439s Unpacking proj-data (9.7.1-1) ... 439s Selecting previously unselected package libjbig0:arm64. 439s Preparing to unpack .../082-libjbig0_2.1-6.1ubuntu3_arm64.deb ... 439s Unpacking libjbig0:arm64 (2.1-6.1ubuntu3) ... 439s Selecting previously unselected package liblerc4:arm64. 439s Preparing to unpack .../083-liblerc4_4.0.0+ds-5ubuntu2_arm64.deb ... 439s Unpacking liblerc4:arm64 (4.0.0+ds-5ubuntu2) ... 439s Selecting previously unselected package libsharpyuv0:arm64. 439s Preparing to unpack .../084-libsharpyuv0_1.5.0-0.1build1_arm64.deb ... 439s Unpacking libsharpyuv0:arm64 (1.5.0-0.1build1) ... 439s Selecting previously unselected package libwebp7:arm64. 439s Preparing to unpack .../085-libwebp7_1.5.0-0.1build1_arm64.deb ... 439s Unpacking libwebp7:arm64 (1.5.0-0.1build1) ... 439s Selecting previously unselected package libtiff6:arm64. 439s Preparing to unpack .../086-libtiff6_4.7.0-3ubuntu3_arm64.deb ... 439s Unpacking libtiff6:arm64 (4.7.0-3ubuntu3) ... 439s Selecting previously unselected package libproj25:arm64. 439s Preparing to unpack .../087-libproj25_9.7.1-1_arm64.deb ... 439s Unpacking libproj25:arm64 (9.7.1-1) ... 439s Selecting previously unselected package libgeotiff5:arm64. 439s Preparing to unpack .../088-libgeotiff5_1.7.4-1_arm64.deb ... 439s Unpacking libgeotiff5:arm64 (1.7.4-1) ... 439s Selecting previously unselected package libgif7:arm64. 439s Preparing to unpack .../089-libgif7_5.2.2-1ubuntu3_arm64.deb ... 439s Unpacking libgif7:arm64 (5.2.2-1ubuntu3) ... 439s Selecting previously unselected package libsz2:arm64. 439s Preparing to unpack .../090-libsz2_1.1.4-2_arm64.deb ... 439s Unpacking libsz2:arm64 (1.1.4-2) ... 439s Selecting previously unselected package libhdf4-0-alt:arm64. 439s Preparing to unpack .../091-libhdf4-0-alt_4.3.0-1_arm64.deb ... 439s Unpacking libhdf4-0-alt:arm64 (4.3.0-1) ... 439s Selecting previously unselected package libhdf5-310:arm64. 439s Preparing to unpack .../092-libhdf5-310_1.14.5+repack-4_arm64.deb ... 439s Unpacking libhdf5-310:arm64 (1.14.5+repack-4) ... 439s Selecting previously unselected package libheif-plugin-aomdec:arm64. 439s Preparing to unpack .../093-libheif-plugin-aomdec_1.21.2-1_arm64.deb ... 439s Unpacking libheif-plugin-aomdec:arm64 (1.21.2-1) ... 439s Selecting previously unselected package libheif-plugin-libde265:arm64. 440s Preparing to unpack .../094-libheif-plugin-libde265_1.21.2-1_arm64.deb ... 440s Unpacking libheif-plugin-libde265:arm64 (1.21.2-1) ... 440s Selecting previously unselected package libheif1:arm64. 440s Preparing to unpack .../095-libheif1_1.21.2-1_arm64.deb ... 440s Unpacking libheif1:arm64 (1.21.2-1) ... 440s Selecting previously unselected package liburiparser1:arm64. 440s Preparing to unpack .../096-liburiparser1_0.9.8+dfsg-2_arm64.deb ... 440s Unpacking liburiparser1:arm64 (0.9.8+dfsg-2) ... 440s Selecting previously unselected package libkmlbase1t64:arm64. 440s Preparing to unpack .../097-libkmlbase1t64_1.3.0-13_arm64.deb ... 440s Unpacking libkmlbase1t64:arm64 (1.3.0-13) ... 440s Selecting previously unselected package libkmldom1t64:arm64. 440s Preparing to unpack .../098-libkmldom1t64_1.3.0-13_arm64.deb ... 440s Unpacking libkmldom1t64:arm64 (1.3.0-13) ... 440s Selecting previously unselected package libkmlengine1t64:arm64. 440s Preparing to unpack .../099-libkmlengine1t64_1.3.0-13_arm64.deb ... 440s Unpacking libkmlengine1t64:arm64 (1.3.0-13) ... 440s Selecting previously unselected package mysql-common. 440s Preparing to unpack .../100-mysql-common_5.8+1.1.1ubuntu2_all.deb ... 440s Unpacking mysql-common (5.8+1.1.1ubuntu2) ... 440s Selecting previously unselected package libmysqlclient24:arm64. 440s Preparing to unpack .../101-libmysqlclient24_8.4.7-0ubuntu3_arm64.deb ... 440s Unpacking libmysqlclient24:arm64 (8.4.7-0ubuntu3) ... 440s Selecting previously unselected package libhdf5-hl-310:arm64. 440s Preparing to unpack .../102-libhdf5-hl-310_1.14.5+repack-4_arm64.deb ... 440s Unpacking libhdf5-hl-310:arm64 (1.14.5+repack-4) ... 440s Selecting previously unselected package libnetcdf22:arm64. 440s Preparing to unpack .../103-libnetcdf22_1%3a4.9.3-1build1_arm64.deb ... 440s Unpacking libnetcdf22:arm64 (1:4.9.3-1build1) ... 440s Selecting previously unselected package libltdl7:arm64. 440s Preparing to unpack .../104-libltdl7_2.5.4-9_arm64.deb ... 440s Unpacking libltdl7:arm64 (2.5.4-9) ... 440s Selecting previously unselected package libodbc2:arm64. 440s Preparing to unpack .../105-libodbc2_2.3.14-1_arm64.deb ... 440s Unpacking libodbc2:arm64 (2.3.14-1) ... 440s Selecting previously unselected package unixodbc-common. 440s Preparing to unpack .../106-unixodbc-common_2.3.14-1_all.deb ... 440s Unpacking unixodbc-common (2.3.14-1) ... 440s Selecting previously unselected package libodbcinst2:arm64. 440s Preparing to unpack .../107-libodbcinst2_2.3.14-1_arm64.deb ... 440s Unpacking libodbcinst2:arm64 (2.3.14-1) ... 440s Selecting previously unselected package libogdi4.1:arm64. 440s Preparing to unpack .../108-libogdi4.1_4.1.1+ds-5_arm64.deb ... 440s Unpacking libogdi4.1:arm64 (4.1.1+ds-5) ... 440s Selecting previously unselected package libopenjp2-7:arm64. 440s Preparing to unpack .../109-libopenjp2-7_2.5.4-1_arm64.deb ... 440s Unpacking libopenjp2-7:arm64 (2.5.4-1) ... 440s Selecting previously unselected package libgpgmepp6t64:arm64. 441s Preparing to unpack .../110-libgpgmepp6t64_1.24.2-3ubuntu2_arm64.deb ... 441s Unpacking libgpgmepp6t64:arm64 (1.24.2-3ubuntu2) ... 441s Selecting previously unselected package liblcms2-2:arm64. 441s Preparing to unpack .../111-liblcms2-2_2.17-1_arm64.deb ... 441s Unpacking liblcms2-2:arm64 (2.17-1) ... 441s Selecting previously unselected package libpoppler147:arm64. 441s Preparing to unpack .../112-libpoppler147_25.03.0-11.1_arm64.deb ... 441s Unpacking libpoppler147:arm64 (25.03.0-11.1) ... 441s Selecting previously unselected package libpq5:arm64. 441s Preparing to unpack .../113-libpq5_18.1-2_arm64.deb ... 441s Unpacking libpq5:arm64 (18.1-2) ... 441s Selecting previously unselected package libqhull-r8.0:arm64. 441s Preparing to unpack .../114-libqhull-r8.0_2020.2-8_arm64.deb ... 441s Unpacking libqhull-r8.0:arm64 (2020.2-8) ... 441s Selecting previously unselected package librttopo1:arm64. 441s Preparing to unpack .../115-librttopo1_1.1.0-4_arm64.deb ... 441s Unpacking librttopo1:arm64 (1.1.0-4) ... 441s Selecting previously unselected package libspatialite8t64:arm64. 441s Preparing to unpack .../116-libspatialite8t64_5.1.0-3ubuntu1_arm64.deb ... 441s Unpacking libspatialite8t64:arm64 (5.1.0-3ubuntu1) ... 441s Selecting previously unselected package libxerces-c3.2t64:arm64. 441s Preparing to unpack .../117-libxerces-c3.2t64_3.2.4+debian-1.3build2_arm64.deb ... 441s Unpacking libxerces-c3.2t64:arm64 (3.2.4+debian-1.3build2) ... 441s Selecting previously unselected package libgdal36:arm64. 441s Preparing to unpack .../118-libgdal36_3.10.3+dfsg-1build3_arm64.deb ... 441s Unpacking libgdal36:arm64 (3.10.3+dfsg-1build3) ... 441s Selecting previously unselected package libjson-perl. 441s Preparing to unpack .../119-libjson-perl_4.10000-1_all.deb ... 441s Unpacking libjson-perl (4.10000-1) ... 441s Selecting previously unselected package liblua5.4-0:arm64. 441s Preparing to unpack .../120-liblua5.4-0_5.4.8-1_arm64.deb ... 441s Unpacking liblua5.4-0:arm64 (5.4.8-1) ... 441s Selecting previously unselected package libnorm1t64:arm64. 441s Preparing to unpack .../121-libnorm1t64_1.5.9+dfsg-4_arm64.deb ... 441s Unpacking libnorm1t64:arm64 (1.5.9+dfsg-4) ... 441s Selecting previously unselected package libpgm-5.3-0t64:arm64. 442s Preparing to unpack .../122-libpgm-5.3-0t64_5.3.128~dfsg-2.1build2_arm64.deb ... 442s Unpacking libpgm-5.3-0t64:arm64 (5.3.128~dfsg-2.1build2) ... 442s Selecting previously unselected package libsodium23:arm64. 442s Preparing to unpack .../123-libsodium23_1.0.18-2_arm64.deb ... 442s Unpacking libsodium23:arm64 (1.0.18-2) ... 442s Selecting previously unselected package libzmq5:arm64. 442s Preparing to unpack .../124-libzmq5_4.3.5-1build3_arm64.deb ... 442s Unpacking libzmq5:arm64 (4.3.5-1build3) ... 442s Selecting previously unselected package node-fortawesome-fontawesome-free. 442s Preparing to unpack .../125-node-fortawesome-fontawesome-free_6.7.2+ds1-1_all.deb ... 442s Unpacking node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 442s Selecting previously unselected package pandoc-data. 442s Preparing to unpack .../126-pandoc-data_3.1.11.1-3build1_all.deb ... 442s Unpacking pandoc-data (3.1.11.1-3build1) ... 442s Selecting previously unselected package pandoc. 442s Preparing to unpack .../127-pandoc_3.1.11.1+ds-4_arm64.deb ... 442s Unpacking pandoc (3.1.11.1+ds-4) ... 443s Selecting previously unselected package pybuild-plugin-autopkgtest. 443s Preparing to unpack .../128-pybuild-plugin-autopkgtest_7.20251231_all.deb ... 443s Unpacking pybuild-plugin-autopkgtest (7.20251231) ... 443s Selecting previously unselected package python3-pyproject-hooks. 443s Preparing to unpack .../129-python3-pyproject-hooks_1.2.0-1_all.deb ... 443s Unpacking python3-pyproject-hooks (1.2.0-1) ... 443s Selecting previously unselected package python3-wheel. 443s Preparing to unpack .../130-python3-wheel_0.46.1-2_all.deb ... 443s Unpacking python3-wheel (0.46.1-2) ... 443s Selecting previously unselected package python3-build. 443s Preparing to unpack .../131-python3-build_1.2.2-5_all.deb ... 443s Unpacking python3-build (1.2.2-5) ... 443s Selecting previously unselected package python3-installer. 443s Preparing to unpack .../132-python3-installer_0.7.0+dfsg1-3_all.deb ... 443s Unpacking python3-installer (0.7.0+dfsg1-3) ... 443s Selecting previously unselected package pybuild-plugin-pyproject. 443s Preparing to unpack .../133-pybuild-plugin-pyproject_7.20251231_all.deb ... 443s Unpacking pybuild-plugin-pyproject (7.20251231) ... 443s Selecting previously unselected package python-pystac-doc. 443s Preparing to unpack .../134-python-pystac-doc_1.14.3-1_all.deb ... 443s Unpacking python-pystac-doc (1.14.3-1) ... 444s Selecting previously unselected package python-tinycss2-common. 444s Preparing to unpack .../135-python-tinycss2-common_1.5.1-1_all.deb ... 444s Unpacking python-tinycss2-common (1.5.1-1) ... 444s Selecting previously unselected package python3-accessible-pygments. 444s Preparing to unpack .../136-python3-accessible-pygments_0.0.5-2build1_all.deb ... 444s Unpacking python3-accessible-pygments (0.0.5-2build1) ... 444s Selecting previously unselected package python3-affine. 444s Preparing to unpack .../137-python3-affine_2.4.0-2_all.deb ... 444s Unpacking python3-affine (2.4.0-2) ... 444s Selecting previously unselected package python3-all. 444s Preparing to unpack .../138-python3-all_3.14.2-1_arm64.deb ... 444s Unpacking python3-all (3.14.2-1) ... 444s Selecting previously unselected package python3-sniffio. 444s Preparing to unpack .../139-python3-sniffio_1.3.1-1_all.deb ... 444s Unpacking python3-sniffio (1.3.1-1) ... 444s Selecting previously unselected package python3-anyio. 444s Preparing to unpack .../140-python3-anyio_4.11.0-3_all.deb ... 444s Unpacking python3-anyio (4.11.0-3) ... 444s Selecting previously unselected package python3-astroid. 444s Preparing to unpack .../141-python3-astroid_4.0.2-1ubuntu1_all.deb ... 444s Unpacking python3-astroid (4.0.2-1ubuntu1) ... 444s Selecting previously unselected package python3-asttokens. 444s Preparing to unpack .../142-python3-asttokens_3.0.1-1_all.deb ... 444s Unpacking python3-asttokens (3.0.1-1) ... 444s Selecting previously unselected package python3-webencodings. 444s Preparing to unpack .../143-python3-webencodings_0.5.1-5build1_all.deb ... 444s Unpacking python3-webencodings (0.5.1-5build1) ... 444s Selecting previously unselected package python3-html5lib. 444s Preparing to unpack .../144-python3-html5lib_1.2-3_all.deb ... 444s Unpacking python3-html5lib (1.2-3) ... 444s Selecting previously unselected package python3-bleach. 444s Preparing to unpack .../145-python3-bleach_6.3.0-1_all.deb ... 444s Unpacking python3-bleach (6.3.0-1) ... 444s Selecting previously unselected package python3-soupsieve. 444s Preparing to unpack .../146-python3-soupsieve_2.8.1-1_all.deb ... 444s Unpacking python3-soupsieve (2.8.1-1) ... 444s Selecting previously unselected package python3-bs4. 444s Preparing to unpack .../147-python3-bs4_4.14.3-2build1_all.deb ... 444s Unpacking python3-bs4 (4.14.3-2build1) ... 444s Selecting previously unselected package python3-click. 444s Preparing to unpack .../148-python3-click_8.2.0+0.really.8.1.8-1build1_all.deb ... 444s Unpacking python3-click (8.2.0+0.really.8.1.8-1build1) ... 444s Selecting previously unselected package python3-click-plugins. 444s Preparing to unpack .../149-python3-click-plugins_1.1.1-5_all.deb ... 444s Unpacking python3-click-plugins (1.1.1-5) ... 445s Selecting previously unselected package python3-cligj. 445s Preparing to unpack .../150-python3-cligj_0.7.2-3_all.deb ... 445s Unpacking python3-cligj (0.7.2-3) ... 445s Selecting previously unselected package python3-colorama. 445s Preparing to unpack .../151-python3-colorama_0.4.6-4build1_all.deb ... 445s Unpacking python3-colorama (0.4.6-4build1) ... 445s Selecting previously unselected package python3-decorator. 445s Preparing to unpack .../152-python3-decorator_5.2.1-2_all.deb ... 445s Unpacking python3-decorator (5.2.1-2) ... 445s Selecting previously unselected package python3-defusedxml. 445s Preparing to unpack .../153-python3-defusedxml_0.7.1-3build1_all.deb ... 445s Unpacking python3-defusedxml (0.7.1-3build1) ... 445s Selecting previously unselected package python3-roman-numerals. 445s Preparing to unpack .../154-python3-roman-numerals_4.1.0-1_all.deb ... 445s Unpacking python3-roman-numerals (4.1.0-1) ... 445s Selecting previously unselected package python3-docutils. 445s Preparing to unpack .../155-python3-docutils_0.22.4+dfsg-1_all.deb ... 445s Unpacking python3-docutils (0.22.4+dfsg-1) ... 445s Selecting previously unselected package python3-executing. 445s Preparing to unpack .../156-python3-executing_2.2.1-0.1_all.deb ... 445s Unpacking python3-executing (2.2.1-0.1) ... 445s Selecting previously unselected package python3-fastjsonschema. 445s Preparing to unpack .../157-python3-fastjsonschema_2.21.1-1_all.deb ... 445s Unpacking python3-fastjsonschema (2.21.1-1) ... 445s Selecting previously unselected package python3-h11. 445s Preparing to unpack .../158-python3-h11_0.14.0-1.1_all.deb ... 445s Unpacking python3-h11 (0.14.0-1.1) ... 445s Selecting previously unselected package python3-imagesize. 445s Preparing to unpack .../159-python3-imagesize_1.4.1-1build1_all.deb ... 445s Unpacking python3-imagesize (1.4.1-1build1) ... 445s Selecting previously unselected package python3-iniconfig. 445s Preparing to unpack .../160-python3-iniconfig_2.1.0-2_all.deb ... 445s Unpacking python3-iniconfig (2.1.0-2) ... 445s Selecting previously unselected package python3-parso. 445s Preparing to unpack .../161-python3-parso_0.8.5-1_all.deb ... 445s Unpacking python3-parso (0.8.5-1) ... 445s Selecting previously unselected package python3-typeshed. 445s Preparing to unpack .../162-python3-typeshed_0.0~git20241223.ea91db2-4_all.deb ... 445s Unpacking python3-typeshed (0.0~git20241223.ea91db2-4) ... 446s Selecting previously unselected package python3-jedi. 446s Preparing to unpack .../163-python3-jedi_0.19.1+ds1-1build1_all.deb ... 446s Unpacking python3-jedi (0.19.1+ds1-1build1) ... 446s Selecting previously unselected package python3-traitlets. 446s Preparing to unpack .../164-python3-traitlets_5.14.3+really5.14.3-2_all.deb ... 446s Unpacking python3-traitlets (5.14.3+really5.14.3-2) ... 446s Selecting previously unselected package python3-matplotlib-inline. 446s Preparing to unpack .../165-python3-matplotlib-inline_0.2.1-1_all.deb ... 446s Unpacking python3-matplotlib-inline (0.2.1-1) ... 446s Selecting previously unselected package python3-wcwidth. 446s Preparing to unpack .../166-python3-wcwidth_0.2.14+dfsg1-1build1_all.deb ... 446s Unpacking python3-wcwidth (0.2.14+dfsg1-1build1) ... 446s Selecting previously unselected package python3-prompt-toolkit. 446s Preparing to unpack .../167-python3-prompt-toolkit_3.0.52-2_all.deb ... 446s Unpacking python3-prompt-toolkit (3.0.52-2) ... 446s Selecting previously unselected package python3-pure-eval. 446s Preparing to unpack .../168-python3-pure-eval_0.2.3-1_all.deb ... 446s Unpacking python3-pure-eval (0.2.3-1) ... 446s Selecting previously unselected package python3-stack-data. 446s Preparing to unpack .../169-python3-stack-data_0.6.3-3_all.deb ... 446s Unpacking python3-stack-data (0.6.3-3) ... 446s Selecting previously unselected package python3-ipython. 446s Preparing to unpack .../170-python3-ipython_8.35.0-2_all.deb ... 446s Unpacking python3-ipython (8.35.0-2) ... 447s Selecting previously unselected package python3-platformdirs. 447s Preparing to unpack .../171-python3-platformdirs_4.5.1-1_all.deb ... 447s Unpacking python3-platformdirs (4.5.1-1) ... 447s Selecting previously unselected package python3-jupyter-core. 447s Preparing to unpack .../172-python3-jupyter-core_5.9.1-1_all.deb ... 447s Unpacking python3-jupyter-core (5.9.1-1) ... 447s Selecting previously unselected package python3-psutil. 447s Preparing to unpack .../173-python3-psutil_7.1.0-1ubuntu1_arm64.deb ... 447s Unpacking python3-psutil (7.1.0-1ubuntu1) ... 447s Selecting previously unselected package python3-tornado. 447s Preparing to unpack .../174-python3-tornado_6.5.4-0.1_arm64.deb ... 447s Unpacking python3-tornado (6.5.4-0.1) ... 447s Selecting previously unselected package python3-zmq. 447s Preparing to unpack .../175-python3-zmq_27.1.0-1_arm64.deb ... 447s Unpacking python3-zmq (27.1.0-1) ... 447s Selecting previously unselected package python3-jupyter-client. 447s Preparing to unpack .../176-python3-jupyter-client_8.7.0-1_all.deb ... 447s Unpacking python3-jupyter-client (8.7.0-1) ... 447s Selecting previously unselected package python3-jupyterlab-pygments. 447s Preparing to unpack .../177-python3-jupyterlab-pygments_0.2.2-3build1_all.deb ... 447s Unpacking python3-jupyterlab-pygments (0.2.2-3build1) ... 447s Selecting previously unselected package python3-livereload. 447s Preparing to unpack .../178-python3-livereload_2.7.1-0.1_all.deb ... 447s Unpacking python3-livereload (2.7.1-0.1) ... 447s Selecting previously unselected package python3-mistune. 447s Preparing to unpack .../179-python3-mistune_3.1.4-1_all.deb ... 447s Unpacking python3-mistune (3.1.4-1) ... 447s Selecting previously unselected package python3-multidict. 447s Preparing to unpack .../180-python3-multidict_6.4.3-1build1_arm64.deb ... 447s Unpacking python3-multidict (6.4.3-1build1) ... 447s Selecting previously unselected package python3-nbformat. 447s Preparing to unpack .../181-python3-nbformat_5.10.4-1_all.deb ... 447s Unpacking python3-nbformat (5.10.4-1) ... 447s Selecting previously unselected package python3-nbclient. 448s Preparing to unpack .../182-python3-nbclient_0.10.4-1_all.deb ... 448s Unpacking python3-nbclient (0.10.4-1) ... 448s Selecting previously unselected package python3-tinycss2. 448s Preparing to unpack .../183-python3-tinycss2_1.5.1-1_all.deb ... 448s Unpacking python3-tinycss2 (1.5.1-1) ... 448s Selecting previously unselected package python3-pandocfilters. 448s Preparing to unpack .../184-python3-pandocfilters_1.5.1-1_all.deb ... 448s Unpacking python3-pandocfilters (1.5.1-1) ... 448s Selecting previously unselected package python3-nbconvert. 448s Preparing to unpack .../185-python3-nbconvert_7.16.6-1_all.deb ... 448s Unpacking python3-nbconvert (7.16.6-1) ... 448s Selecting previously unselected package sphinx-common. 448s Preparing to unpack .../186-sphinx-common_8.2.3-12_all.deb ... 448s Unpacking sphinx-common (8.2.3-12) ... 448s Selecting previously unselected package python3-alabaster. 448s Preparing to unpack .../187-python3-alabaster_0.7.16-0.1build1_all.deb ... 448s Unpacking python3-alabaster (0.7.16-0.1build1) ... 448s Selecting previously unselected package python3-snowballstemmer. 448s Preparing to unpack .../188-python3-snowballstemmer_3.0.1-1_all.deb ... 448s Unpacking python3-snowballstemmer (3.0.1-1) ... 448s Selecting previously unselected package python3-sphinx. 448s Preparing to unpack .../189-python3-sphinx_8.2.3-12_all.deb ... 448s Unpacking python3-sphinx (8.2.3-12) ... 448s Selecting previously unselected package python3-nbsphinx. 448s Preparing to unpack .../190-python3-nbsphinx_0.9.5+ds-1_all.deb ... 448s Unpacking python3-nbsphinx (0.9.5+ds-1) ... 448s Selecting previously unselected package python3-pluggy. 448s Preparing to unpack .../191-python3-pluggy_1.6.0-2_all.deb ... 448s Unpacking python3-pluggy (1.6.0-2) ... 448s Selecting previously unselected package python3-propcache. 448s Preparing to unpack .../192-python3-propcache_0.3.1-1build1_arm64.deb ... 448s Unpacking python3-propcache (0.3.1-1build1) ... 448s Selecting previously unselected package python3-pydata-sphinx-theme. 448s Preparing to unpack .../193-python3-pydata-sphinx-theme_0.16.1+dfsg-5_all.deb ... 448s Unpacking python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 449s Selecting previously unselected package python3-pystac. 449s Preparing to unpack .../194-python3-pystac_1.14.3-1_all.deb ... 449s Unpacking python3-pystac (1.14.3-1) ... 449s Selecting previously unselected package python3-pytest. 449s Preparing to unpack .../195-python3-pytest_9.0.2-2_all.deb ... 449s Unpacking python3-pytest (9.0.2-2) ... 449s Selecting previously unselected package python3-pytest-mock. 449s Preparing to unpack .../196-python3-pytest-mock_3.15.1-1_all.deb ... 449s Unpacking python3-pytest-mock (3.15.1-1) ... 449s Selecting previously unselected package python3-wrapt. 449s Preparing to unpack .../197-python3-wrapt_1.17.3-3_arm64.deb ... 449s Unpacking python3-wrapt (1.17.3-3) ... 449s Selecting previously unselected package python3-yarl. 449s Preparing to unpack .../198-python3-yarl_1.22.0-1_arm64.deb ... 449s Unpacking python3-yarl (1.22.0-1) ... 449s Selecting previously unselected package python3-vcr. 449s Preparing to unpack .../199-python3-vcr_7.0.0-2_all.deb ... 449s Unpacking python3-vcr (7.0.0-2) ... 449s Selecting previously unselected package python3-pytest-recording. 449s Preparing to unpack .../200-python3-pytest-recording_0.13.4-1_all.deb ... 449s Unpacking python3-pytest-recording (0.13.4-1) ... 449s Selecting previously unselected package python3-rasterio. 449s Preparing to unpack .../201-python3-rasterio_1.4.3-2build2_arm64.deb ... 449s Unpacking python3-rasterio (1.4.3-2build2) ... 449s Selecting previously unselected package python3-requests-mock. 449s Preparing to unpack .../202-python3-requests-mock_1.12.1-4_all.deb ... 449s Unpacking python3-requests-mock (1.12.1-4) ... 449s Selecting previously unselected package python3-shapely. 449s Preparing to unpack .../203-python3-shapely_2.1.2-1ubuntu1_arm64.deb ... 449s Unpacking python3-shapely (2.1.2-1ubuntu1) ... 449s Selecting previously unselected package python3-starlette. 449s Preparing to unpack .../204-python3-starlette_0.50.0-1_all.deb ... 449s Unpacking python3-starlette (0.50.0-1) ... 449s Selecting previously unselected package python3-uvloop. 449s Preparing to unpack .../205-python3-uvloop_0.22.1+ds1-2_arm64.deb ... 449s Unpacking python3-uvloop (0.22.1+ds1-2) ... 450s Selecting previously unselected package python3-wsproto. 450s Preparing to unpack .../206-python3-wsproto_1.3.2-1_all.deb ... 450s Unpacking python3-wsproto (1.3.2-1) ... 450s Selecting previously unselected package python3-uvicorn. 450s Preparing to unpack .../207-python3-uvicorn_0.38.0-1_all.deb ... 450s Unpacking python3-uvicorn (0.38.0-1) ... 450s Selecting previously unselected package python3-watchfiles. 450s Preparing to unpack .../208-python3-watchfiles_1.1.1-2_arm64.deb ... 450s Unpacking python3-watchfiles (1.1.1-2) ... 450s Selecting previously unselected package python3-websockets. 450s Preparing to unpack .../209-python3-websockets_15.0.1-1build1_arm64.deb ... 450s Unpacking python3-websockets (15.0.1-1build1) ... 450s Selecting previously unselected package python3-sphinx-autobuild. 450s Preparing to unpack .../210-python3-sphinx-autobuild_2025.08.25-1_all.deb ... 450s Unpacking python3-sphinx-autobuild (2025.08.25-1) ... 450s Selecting previously unselected package python3-sphinx-design. 450s Preparing to unpack .../211-python3-sphinx-design_0.6.1-2_all.deb ... 450s Unpacking python3-sphinx-design (0.6.1-2) ... 450s Selecting previously unselected package libjs-mathjax. 450s Preparing to unpack .../212-libjs-mathjax_2.7.9+dfsg-1build1_all.deb ... 450s Unpacking libjs-mathjax (2.7.9+dfsg-1build1) ... 451s Setting up dh-python (7.20251231) ... 451s Setting up liblcms2-2:arm64 (2.17-1) ... 451s Setting up python3-iniconfig (2.1.0-2) ... 451s Setting up python3-sniffio (1.3.1-1) ... 451s Setting up python3-tornado (6.5.4-0.1) ... 452s Setting up libnorm1t64:arm64 (1.5.9+dfsg-4) ... 452s Setting up libsharpyuv0:arm64 (1.5.0-0.1build1) ... 452s Setting up libgpgmepp6t64:arm64 (1.24.2-3ubuntu2) ... 452s Setting up libaom3:arm64 (3.13.1-2) ... 452s Setting up mysql-common (5.8+1.1.1ubuntu2) ... 452s update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode 452s Setting up python3-pure-eval (0.2.3-1) ... 453s Setting up fonts-mathjax (2.7.9+dfsg-1build1) ... 453s Setting up libsodium23:arm64 (1.0.18-2) ... 453s Setting up liblerc4:arm64 (4.0.0+ds-5ubuntu2) ... 453s Setting up proj-data (9.7.1-1) ... 453s Setting up python-pystac-doc (1.14.3-1) ... 453s Setting up libjs-mathjax (2.7.9+dfsg-1build1) ... 453s Setting up python3-anyio (4.11.0-3) ... 453s Setting up python3-parso (0.8.5-1) ... 453s Setting up libogdi4.1:arm64 (4.1.1+ds-5) ... 453s Setting up python3-colorama (0.4.6-4build1) ... 454s Setting up python3-defusedxml (0.7.1-3build1) ... 454s Setting up libarchive-zip-perl (1.68-1) ... 454s Setting up python3-alabaster (0.7.16-0.1build1) ... 454s Setting up libdebhelper-perl (13.28ubuntu1) ... 454s Setting up libpq5:arm64 (18.1-2) ... 454s Setting up libdeflate0:arm64 (1.23-2) ... 454s Setting up m4 (1.4.20-2) ... 454s Setting up python3-watchfiles (1.1.1-2) ... 455s Setting up libqhull-r8.0:arm64 (2020.2-8) ... 455s Setting up node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 455s Setting up python3-starlette (0.50.0-1) ... 455s Setting up python3-pandocfilters (1.5.1-1) ... 455s Setting up libxerces-c3.2t64:arm64 (3.2.4+debian-1.3build2) ... 455s Setting up libgomp1:arm64 (15.2.0-11ubuntu1) ... 455s Setting up python3-click (8.2.0+0.really.8.1.8-1build1) ... 456s Setting up libabsl20240722:arm64 (20240722.0-4ubuntu1) ... 456s Setting up libmysqlclient24:arm64 (8.4.7-0ubuntu3) ... 456s Setting up python3-wheel (0.46.1-2) ... 456s Setting up libjbig0:arm64 (2.1-6.1ubuntu3) ... 456s Setting up python3-webencodings (0.5.1-5build1) ... 456s Setting up libaec0:arm64 (1.1.4-2) ... 456s Setting up python3-platformdirs (4.5.1-1) ... 456s Setting up python3-psutil (7.1.0-1ubuntu1) ... 457s Setting up gdal-data (3.12.1+dfsg-1) ... 457s Setting up python3-multidict (6.4.3-1build1) ... 457s Setting up libsnappy1v5:arm64 (1.2.2-2) ... 457s Setting up python3-jupyterlab-pygments (0.2.2-3build1) ... 458s Setting up libpgm-5.3-0t64:arm64 (5.3.128~dfsg-2.1build2) ... 458s Setting up python3-decorator (5.2.1-2) ... 458s Setting up autotools-dev (20240727.1) ... 458s Setting up libblas3:arm64 (3.12.1-7ubuntu1) ... 458s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 458s Setting up libcfitsio10t64:arm64 (4.6.3-1) ... 458s Setting up python3-wcwidth (0.2.14+dfsg1-1build1) ... 458s Setting up python3-pyproject-hooks (1.2.0-1) ... 459s Setting up python3-accessible-pygments (0.0.5-2build1) ... 459s Setting up python3-typeshed (0.0~git20241223.ea91db2-4) ... 459s Setting up python3-snowballstemmer (3.0.1-1) ... 459s Setting up python3-requests-mock (1.12.1-4) ... 460s Setting up fonts-dejavu-mono (2.37-8build1) ... 460s Setting up libmpc3:arm64 (1.3.1-2) ... 460s Setting up python3-numpy-dev:arm64 (1:2.3.5+ds-3) ... 460s Setting up python3-wrapt (1.17.3-3) ... 460s Setting up python3-h11 (0.14.0-1.1) ... 460s Setting up autopoint (0.23.2-1) ... 460s Setting up python3-click-plugins (1.1.1-5) ... 461s Setting up fonts-dejavu-core (2.37-8build1) ... 461s Setting up unixodbc-common (2.3.14-1) ... 461s Setting up libjpeg-turbo8:arm64 (2.1.5-4ubuntu2) ... 461s Setting up python3-html5lib (1.2-3) ... 461s Setting up libltdl7:arm64 (2.5.4-9) ... 461s Setting up python3-uvloop (0.22.1+ds1-2) ... 461s Setting up python3-installer (0.7.0+dfsg1-3) ... 462s Setting up libgfortran5:arm64 (15.2.0-11ubuntu1) ... 462s Setting up autoconf (2.72-3.1ubuntu1) ... 462s Setting up python3-pluggy (1.6.0-2) ... 462s Setting up libwebp7:arm64 (1.5.0-0.1build1) ... 462s Setting up libubsan1:arm64 (15.2.0-11ubuntu1) ... 462s Setting up python3-fastjsonschema (2.21.1-1) ... 462s Setting up libgif7:arm64 (5.2.2-1ubuntu3) ... 462s Setting up libodbc2:arm64 (2.3.14-1) ... 462s Setting up libgav1-2:arm64 (0.20.0-2) ... 462s Setting up libgeos3.14.1:arm64 (3.14.1-2) ... 462s Setting up liburiparser1:arm64 (0.9.8+dfsg-2) ... 462s Setting up libfyba0t64:arm64 (4.1.1-11build2) ... 462s Setting up dwz (0.16-2) ... 462s Setting up libdav1d7:arm64 (1.5.3-1) ... 462s Setting up libminizip1t64:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 462s Setting up python3-astroid (4.0.2-1ubuntu1) ... 463s Setting up libhwasan0:arm64 (15.2.0-11ubuntu1) ... 463s Setting up python3-livereload (2.7.1-0.1) ... 463s Setting up python3-propcache (0.3.1-1build1) ... 464s Setting up python3-traitlets (5.14.3+really5.14.3-2) ... 464s Setting up libasan8:arm64 (15.2.0-11ubuntu1) ... 464s Setting up python-tinycss2-common (1.5.1-1) ... 464s Setting up libjson-perl (4.10000-1) ... 464s Setting up libblosc1:arm64 (1.21.5+ds-2) ... 464s Setting up debugedit (1:5.2-3) ... 464s Setting up python3-roman-numerals (4.1.0-1) ... 464s Setting up liblua5.4-0:arm64 (5.4.8-1) ... 464s Setting up libopenjp2-7:arm64 (2.5.4-1) ... 464s Setting up python3.13-minimal (3.13.11-1) ... 465s Setting up sgml-base (1.31+nmu1) ... 465s Setting up pandoc-data (3.1.11.1-3build1) ... 465s Setting up libtsan2:arm64 (15.2.0-11ubuntu1) ... 465s Setting up libisl23:arm64 (0.27-1build1) ... 466s Setting up python3-affine (2.4.0-2) ... 466s Setting up python3-build (1.2.2-5) ... 466s Setting up libde265-0:arm64 (1.0.16-1build1) ... 466s Setting up libkmlbase1t64:arm64 (1.3.0-13) ... 466s Setting up python3-yarl (1.22.0-1) ... 466s Setting up python3-mistune (3.1.4-1) ... 467s Setting up python3-soupsieve (2.8.1-1) ... 467s Setting up libcc1-0:arm64 (15.2.0-11ubuntu1) ... 467s Setting up python3-jupyter-core (5.9.1-1) ... 467s Setting up liblsan0:arm64 (15.2.0-11ubuntu1) ... 467s Setting up libsz2:arm64 (1.1.4-2) ... 467s Setting up libitm1:arm64 (15.2.0-11ubuntu1) ... 467s Setting up python3-imagesize (1.4.1-1build1) ... 467s Setting up gdal-plugins:arm64 (3.12.1+dfsg-1) ... 467s Setting up python3-websockets (15.0.1-1build1) ... 468s Setting up python3-pystac (1.14.3-1) ... 468s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 468s Setting up automake (1:1.18.1-3build1) ... 468s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 468s Setting up python3-prompt-toolkit (3.0.52-2) ... 469s Setting up libfile-stripnondeterminism-perl (1.15.0-1build1) ... 469s Setting up cpp-15-aarch64-linux-gnu (15.2.0-11ubuntu1) ... 469s Setting up libodbcinst2:arm64 (2.3.14-1) ... 469s Setting up liblapack3:arm64 (3.12.1-7ubuntu1) ... 469s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 469s Setting up gettext (0.23.2-1) ... 469s Setting up libarpack2t64:arm64 (3.9.1-6) ... 469s Setting up python3-tinycss2 (1.5.1-1) ... 470s Setting up libgcc-15-dev:arm64 (15.2.0-11ubuntu1) ... 470s Setting up libzmq5:arm64 (4.3.5-1build3) ... 470s Setting up python3-wsproto (1.3.2-1) ... 470s Setting up python3-jedi (0.19.1+ds1-1build1) ... 470s Setting up python3.13 (3.13.11-1) ... 472s Setting up python3-asttokens (3.0.1-1) ... 472s Setting up pybuild-plugin-pyproject (7.20251231) ... 472s Setting up fontconfig-config (2.15.0-2.4ubuntu1) ... 472s Setting up python3-pytest (9.0.2-2) ... 473s Setting up libgeos-c1t64:arm64 (3.14.1-2) ... 473s Setting up python3-cligj (0.7.2-3) ... 473s Setting up python3-all (3.14.2-1) ... 473s Setting up python3-nbformat (5.10.4-1) ... 474s Setting up python3-bs4 (4.14.3-2build1) ... 474s Setting up intltool-debian (0.35.0+20060710.6build1) ... 474s Setting up python3-bleach (6.3.0-1) ... 474s Setting up python3-matplotlib-inline (0.2.1-1) ... 475s Setting up libkmldom1t64:arm64 (1.3.0-13) ... 475s Setting up cpp-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 475s Setting up libstdc++-15-dev:arm64 (15.2.0-11ubuntu1) ... 475s Setting up pandoc (3.1.11.1+ds-4) ... 475s Setting up python3-executing (2.2.1-0.1) ... 475s Setting up python3-zmq (27.1.0-1) ... 475s Setting up sphinx-common (8.2.3-12) ... 475s Setting up python3-vcr (7.0.0-2) ... 476s Setting up python3-numpy (1:2.3.5+ds-3) ... 480s Setting up libhdf4-0-alt:arm64 (4.3.0-1) ... 480s Setting up dh-strip-nondeterminism (1.15.0-1build1) ... 480s Setting up librttopo1:arm64 (1.1.0-4) ... 480s Setting up libhdf5-310:arm64 (1.14.5+repack-4) ... 480s Setting up libfreexl1:arm64 (2.0.0-1build3) ... 480s Setting up python3-pytest-mock (3.15.1-1) ... 480s Setting up cpp-15 (15.2.0-11ubuntu1) ... 480s Setting up libtiff6:arm64 (4.7.0-3ubuntu3) ... 480s Setting up cpp (4:15.2.0-4ubuntu1) ... 480s Setting up xml-core (0.19build1) ... 480s Setting up python3-jupyter-client (8.7.0-1) ... 481s Setting up libarmadillo14 (1:14.2.3+dfsg-1) ... 481s Setting up libfontconfig1:arm64 (2.15.0-2.4ubuntu1) ... 481s Setting up libyuv0:arm64 (0.0.1922.20260106-1) ... 481s Setting up python3-stack-data (0.6.3-3) ... 481s Setting up python3-pytest-recording (0.13.4-1) ... 481s Setting up libhdf5-hl-310:arm64 (1.14.5+repack-4) ... 481s Setting up libavif16:arm64 (1.3.0-1ubuntu3) ... 481s Setting up python3-shapely (2.1.2-1ubuntu1) ... 482s Setting up gcc-15-aarch64-linux-gnu (15.2.0-11ubuntu1) ... 482s Setting up python3-uvicorn (0.38.0-1) ... 482s Setting up libpoppler147:arm64 (25.03.0-11.1) ... 482s Setting up libproj25:arm64 (9.7.1-1) ... 482s Setting up po-debconf (1.0.22) ... 483s Setting up libnetcdf22:arm64 (1:4.9.3-1build1) ... 483s Setting up libkmlengine1t64:arm64 (1.3.0-13) ... 483s Setting up libgeotiff5:arm64 (1.7.4-1) ... 483s Setting up python3-nbclient (0.10.4-1) ... 483s Setting up gcc-15 (15.2.0-11ubuntu1) ... 483s Setting up g++-15-aarch64-linux-gnu (15.2.0-11ubuntu1) ... 483s Setting up python3-ipython (8.35.0-2) ... 484s /usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:3141: SyntaxWarning: 'return' in a 'finally' block 484s return result 484s Setting up python3-nbconvert (7.16.6-1) ... 484s Setting up g++-15 (15.2.0-11ubuntu1) ... 484s Setting up libspatialite8t64:arm64 (5.1.0-3ubuntu1) ... 484s Setting up gcc-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 484s Setting up libtool (2.5.4-9) ... 485s Setting up gcc (4:15.2.0-4ubuntu1) ... 485s Setting up dh-autoreconf (21) ... 485s Setting up g++-aarch64-linux-gnu (4:15.2.0-4ubuntu1) ... 485s Setting up debhelper (13.28ubuntu1) ... 485s Setting up g++ (4:15.2.0-4ubuntu1) ... 485s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 485s Setting up build-essential (12.12ubuntu2) ... 485s Setting up pybuild-plugin-autopkgtest (7.20251231) ... 485s Setting up libheif-plugin-aomdec:arm64 (1.21.2-1) ... 485s Setting up libheif1:arm64 (1.21.2-1) ... 485s Setting up libgdal36:arm64 (3.10.3+dfsg-1build3) ... 485s Setting up libheif-plugin-libde265:arm64 (1.21.2-1) ... 485s Setting up python3-rasterio (1.4.3-2build2) ... 485s Processing triggers for install-info (7.2-5) ... 485s Processing triggers for libc-bin (2.42-2ubuntu4) ... 485s Processing triggers for systemd (259-1ubuntu2) ... 485s Processing triggers for man-db (2.13.1-1) ... 488s Processing triggers for sgml-base (1.31+nmu1) ... 488s Setting up docutils-common (0.22.4+dfsg-1) ... 488s Processing triggers for sgml-base (1.31+nmu1) ... 488s Setting up python3-docutils (0.22.4+dfsg-1) ... 489s Setting up python3-sphinx (8.2.3-12) ... 490s Setting up python3-sphinx-autobuild (2025.08.25-1) ... 491s Setting up python3-sphinx-design (0.6.1-2) ... 491s Setting up python3-nbsphinx (0.9.5+ds-1) ... 491s Setting up python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 495s autopkgtest [21:08:42]: test pybuild-autopkgtest: pybuild-autopkgtest 495s autopkgtest [21:08:42]: test pybuild-autopkgtest: [----------------------- 496s pybuild-autopkgtest 496s I: pybuild base:384: cd /tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build; python3.13 -m pytest tests 500s ============================= test session starts ============================== 500s platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0 500s rootdir: /tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build 500s configfile: pyproject.toml 500s plugins: anyio-4.11.0, requests_mock-1.12.1, typeguard-4.4.4, recording-0.13.4, mock-3.15.1 500s collected 1557 items 500s 500s tests/extensions/test_classification.py .................... [ 1%] 500s tests/extensions/test_custom.py ....... [ 1%] 500s tests/extensions/test_datacube.py ................................. [ 3%] 501s tests/extensions/test_eo.py .......................................... [ 6%] 501s tests/extensions/test_ext.py ........................................... [ 9%] 501s ....... [ 9%] 501s tests/extensions/test_file.py ................................. [ 11%] 501s tests/extensions/test_grid.py ............ [ 12%] 501s tests/extensions/test_mgrs.py ................... [ 13%] 501s tests/extensions/test_mlm.py ........................................... [ 16%] 501s ... [ 16%] 502s tests/extensions/test_pointcloud.py ...................... [ 18%] 503s tests/extensions/test_projection.py ................................... [ 20%] 503s tests/extensions/test_raster.py ......... [ 21%] 503s tests/extensions/test_render.py .................. [ 22%] 503s tests/extensions/test_sar.py ...................... [ 23%] 503s tests/extensions/test_sat.py .......................... [ 25%] 504s tests/extensions/test_scientific.py .................................... [ 27%] 504s . [ 27%] 504s tests/extensions/test_storage.py ................... [ 28%] 504s tests/extensions/test_table.py ......... [ 29%] 504s tests/extensions/test_timestamps.py ................. [ 30%] 504s tests/extensions/test_version.py .............................. [ 32%] 504s tests/extensions/test_view.py ....................... [ 33%] 504s tests/extensions/test_xarray_assets.py ..................... [ 35%] 505s tests/html/test_html.py .......... [ 35%] 505s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 505s tests/serialization/test_identify.py ................................... [ 38%] 505s ........................................................................ [ 43%] 505s .......................... [ 45%] 505s tests/serialization/test_migrate.py .................................... [ 47%] 505s ........................................................................ [ 51%] 505s ......................... [ 53%] 506s tests/test_asset.py ...............ssss [ 54%] 506s tests/test_cache.py .... [ 55%] 506s tests/test_catalog.py .................................................. [ 58%] 510s ........................................................................ [ 62%] 510s ................... [ 64%] 510s tests/test_collection.py ............................................... [ 67%] 510s ...... [ 67%] 510s tests/test_common_metadata.py ...................... [ 68%] 510s tests/test_item.py ..................................................... [ 72%] 510s [ 72%] 510s tests/test_item_assets.py ............. [ 73%] 511s tests/test_item_collection.py .................. [ 74%] 511s tests/test_layout.py ............................................. [ 77%] 511s tests/test_link.py ........................................... [ 79%] 511s tests/test_pystac_client.py s. [ 80%] 511s tests/test_stac_io.py ................ [ 81%] 511s tests/test_summaries.py ........... [ 81%] 511s tests/test_utils.py ................................ssssssss..s......... [ 85%] 512s ............................................................... [ 89%] 512s tests/test_version.py .. [ 89%] 526s tests/test_writing.py ..................... [ 90%] 526s tests/validation/test_schema_uri_map.py . [ 90%] 531s tests/validation/test_validate.py ...................................... [ 93%] 534s ........................................................................ [ 97%] 545s .................................. [100%] 545s 545s ====================== 1539 passed, 18 skipped in 47.24s ======================= 545s I: pybuild base:384: cd /tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build; python3.14 -m pytest tests 548s ============================= test session starts ============================== 548s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 548s rootdir: /tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build 548s configfile: pyproject.toml 548s plugins: anyio-4.11.0, requests_mock-1.12.1, typeguard-4.4.4, recording-0.13.4, mock-3.15.1 548s collected 1557 items 548s 549s tests/extensions/test_classification.py ......EE.....E...... [ 1%] 549s tests/extensions/test_custom.py ....... [ 1%] 549s tests/extensions/test_datacube.py .......................E..EE..... [ 3%] 550s tests/extensions/test_eo.py .....EE.EE...............EE............... [ 6%] 550s tests/extensions/test_ext.py ........................................... [ 9%] 550s ....... [ 9%] 552s tests/extensions/test_file.py .....EEE.....EEEEE.EEEEE.......EE [ 11%] 552s tests/extensions/test_grid.py ..E.E....... [ 12%] 553s tests/extensions/test_mgrs.py ........E...EEE.... [ 13%] 553s tests/extensions/test_mlm.py .........................E...E............. [ 16%] 553s ... [ 16%] 554s tests/extensions/test_pointcloud.py ..EEEEEEE............. [ 18%] 555s tests/extensions/test_projection.py ..EEE.EE.EEEEE.........E........... [ 20%] 556s tests/extensions/test_raster.py .EE...... [ 21%] 556s tests/extensions/test_render.py ................EE [ 22%] 556s tests/extensions/test_sar.py .EE................... [ 23%] 558s tests/extensions/test_sat.py ...EEEEEEEEE..EE.......... [ 25%] 560s tests/extensions/test_scientific.py ...EEEEEEEEEE...EEEEEEEEEE.......... [ 27%] 560s . [ 27%] 561s tests/extensions/test_storage.py ..E............EEEE [ 28%] 561s tests/extensions/test_table.py E........ [ 29%] 561s tests/extensions/test_timestamps.py ..EEEE........... [ 30%] 563s tests/extensions/test_version.py ...EEEEEEEE......EE.EE....EE.. [ 32%] 564s tests/extensions/test_view.py ..EEEEEE............... [ 33%] 565s tests/extensions/test_xarray_assets.py ...........EE....EE.. [ 35%] 565s tests/html/test_html.py .......... [ 35%] 565s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 565s tests/serialization/test_identify.py ................................... [ 38%] 565s ........................................................................ [ 43%] 565s .......................... [ 45%] 565s tests/serialization/test_migrate.py .................................... [ 47%] 566s ........................................................................ [ 51%] 566s ......................... [ 53%] 566s tests/test_asset.py ...............ssss [ 54%] 566s tests/test_cache.py .... [ 55%] 566s tests/test_catalog.py ........E......................................... [ 58%] 569s ...........................EEEEEEEE.................................EE.. [ 62%] 569s ................... [ 64%] 569s tests/test_collection.py ............................................... [ 67%] 569s ...... [ 67%] 569s tests/test_common_metadata.py ...................... [ 68%] 570s tests/test_item.py ..........E.E..E....E......................E......... [ 72%] 570s [ 72%] 570s tests/test_item_assets.py ............. [ 73%] 570s tests/test_item_collection.py .................. [ 74%] 570s tests/test_layout.py ............................................. [ 77%] 570s tests/test_link.py ........................................... [ 79%] 570s tests/test_pystac_client.py s. [ 80%] 571s tests/test_stac_io.py ...........EE.EE [ 81%] 571s tests/test_summaries.py ........... [ 81%] 571s tests/test_utils.py ................................ssssssss..s......... [ 85%] 572s ............................................................... [ 89%] 572s tests/test_version.py .. [ 89%] 574s tests/test_writing.py EEEEEEEEEEEEEEEEEEEEE [ 90%] 574s tests/validation/test_schema_uri_map.py . [ 90%] 579s tests/validation/test_validate.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 93%] 588s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 97%] 593s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.... [100%] 593s 593s ==================================== ERRORS ==================================== 593s ____________________ ERROR at setup of test_apply_bitfields ____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_apply_classes _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of test_validate_classification ________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_validate ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_set_variables _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________________ ERROR at setup of test_set_dimensions _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_validate_eo ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________________ ERROR at setup of test_bands _________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_asset_bands ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_cloud_cover ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________ ERROR at setup of test_set_field[cloud_cover-7.8] _______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________ ERROR at setup of test_set_field[snow_cover-99] ________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_validate_item _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________ ERROR at setup of test_validate_collection __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________________ ERROR at setup of test_validate_catalog ____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________ ERROR at setup of test_set_field_on_asset[thumbnail-size-1] __________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___ ERROR at setup of test_set_field_on_asset[measurement-header_size-8192] ____ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of test_set_field_on_asset[thumbnail-byte_order-little-endian] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of test_set_field_on_asset[calibrations-local_path-different-file.xml] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________ ERROR at setup of test_set_field_on_link[about-size-129302] __________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of test_set_field_on_link[about-header_size-4092] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____ ERROR at setup of test_set_field_on_link[about-byte_order-big-endian] _____ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______ ERROR at setup of test_set_field_on_link[about-local_path-a/path] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________ ERROR at setup of test_migrate_from_v2_0_0 __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________ ERROR at setup of test_migrate_from_v1_0_0 __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_attributes _______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________________ ERROR at setup of test_modify _________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_validate ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________ ERROR at setup of test_set_field[latitude_band-C] _______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________ ERROR at setup of test_set_field[grid_square-ZA] _______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of test_set_field[utm_zone-59] _________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________________ ERROR at setup of test_apply _________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_validate_mlm ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________ ERROR at setup of test_validate_pointcloud __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________________ ERROR at setup of test_count _________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________________ ERROR at setup of test_type __________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_encoding ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________________ ERROR at setup of test_schemas ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_statistics _______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________________ ERROR at setup of test_density ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_partial_apply _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_validate_proj _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________________ ERROR at setup of test_epsg __________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________________ ERROR at setup of test_wkt2 __________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_projjson ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_geometry ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________________ ERROR at setup of test_bbox __________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_centroid ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________________ ERROR at setup of test_shape _________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_transform _______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_get_set_code ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________________ ERROR at setup of test_validate_raster ____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_asset_bands ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_item_validate _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________ ERROR at setup of test_collection_validate __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_required ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________________ ERROR at setup of test_all __________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_no_args_fails _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_orbit_state ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________________ ERROR at setup of test_relative_orbit _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________________ ERROR at setup of test_absolute_orbit _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_anx_datetime ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________ ERROR at setup of test_platform_international_designator ___________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________ ERROR at setup of test_relative_orbit_no_negative _______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________________ ERROR at setup of test_both __________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________________ ERROR at setup of test_modify _________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________________ ERROR at setup of test_clear_orbit_state ___________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________ ERROR at setup of test_clear_relative_orbit __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________________ ERROR at setup of test_doi __________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_citation ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________________ ERROR at setup of test_publications_one ____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_publications ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of test_remove_publication_one _________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________ ERROR at setup of test_remove_all_publications_one ______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________ ERROR at setup of test_remove_publication_forward _______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________ ERROR at setup of test_remove_publication_reverse _______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________ ERROR at setup of test_remove_all_publications_with_some ___________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________ ERROR at setup of test_remove_all_publications_with_none ___________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________________ ERROR at setup of test_collection_doi _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________ ERROR at setup of test_collection_citation __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________ ERROR at setup of test_collection_publications_one ______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of test_collection_publications ________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________ ERROR at setup of test_collection_remove_publication_one ___________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________ ERROR at setup of test_collection_remove_all_publications_one _________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________ ERROR at setup of test_collection_remove_publication_forward _________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________ ERROR at setup of test_collection_remove_publication_reverse _________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____ ERROR at setup of test_collection_remove_all_publications_with_some ______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____ ERROR at setup of test_collection_remove_all_publications_with_none ______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________________ ERROR at setup of test_validate_storage ____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________________ ERROR at setup of test_asset_platform _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_asset_region ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________ ERROR at setup of test_asset_requester_pays __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_asset_tier _______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_validate ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_table' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________ ERROR at setup of test_validate_timestamps __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________________ ERROR at setup of test_expires ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_published _______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_unpublished ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_add_version ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________ ERROR at setup of test_version_in_properties _________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________ ERROR at setup of test_add_not_deprecated_version _______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of test_add_deprecated_version _________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________________ ERROR at setup of test_latest _________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_predecessor ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_successor _______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_all_links _______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of test_collection_add_version _________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of test_collection_validate_all ________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________ ERROR at setup of test_catalog_add_version __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________________ ERROR at setup of test_catalog_validate_all __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________________ ERROR at setup of test_optional_version ____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________________ ERROR at setup of test_assets _________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_validate_view _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________________ ERROR at setup of test_off_nadir _______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________________ ERROR at setup of test_incidence_angle ____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________________ ERROR at setup of test_azimuth ________________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ______________________ ERROR at setup of test_sun_azimuth ______________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_sun_elevation _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_item_validate _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __________________ ERROR at setup of test_collection_validate __________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________ ERROR at setup of test_set_field[storage_options-value0] ___________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________ ERROR at setup of test_set_field[open_kwargs-value1] _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of TestCatalog.test_read_remote ________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of TestCatalog.test_validate_all[cat0] _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of TestCatalog.test_validate_all[cat1] _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of TestCatalog.test_validate_all[cat2] _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of TestCatalog.test_validate_all[cat3] _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of TestCatalog.test_validate_all[cat4] _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of TestCatalog.test_validate_all[cat5] _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of TestCatalog.test_validate_all[cat6] _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________ ERROR at setup of TestCatalog.test_validate_all_invalid ____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of test_validate_all_with_max_n ________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of test_validate_all_with_recusive_off _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_catalog' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_null_datetime _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_item' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______________ ERROR at setup of test_null_datetime_constructor _______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_item' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_null_geometry _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_item' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ________________ ERROR at setup of test_relative_extension_path ________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_item' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of test_non_hierarchical_relative_link _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_item' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________________ ERROR at setup of test_retry_stac_io _____________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ___________________ ERROR at setup of test_retry_stac_io_404 ___________________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s ____________ ERROR at setup of test_urls_with_non_ascii_characters _____________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _____________ ERROR at setup of test_proj_json_schema_is_readable ______________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog0] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog1] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog2] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog3] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog4] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog5] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog6] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog0] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog1] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog2] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog3] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog4] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog5] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog6] _ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog0] ___ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog1] ___ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog2] ___ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog3] ___ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog4] ___ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog5] ___ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog6] ___ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/cassettes/test_writing' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _________ ERROR at setup of TestValidate.test_validate_current_version _________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example0] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example1] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example2] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example3] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example4] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example5] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example6] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example7] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example8] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example9] ________ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example10] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example11] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example12] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example13] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example14] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example15] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example16] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example17] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example18] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example19] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example20] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example21] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example22] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example23] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example24] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example25] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example26] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 593s :class:`ParserElement.parse_string` can be 593s accessed as a nested list, a dictionary, or an object with named 593s attributes. 593s 593s The pyparsing module handles some of the problems that are typically 593s vexing when writing text parsers: 593s 593s - extra or missing whitespace (the above program will also handle 593s "Hello,World!", "Hello , World !", etc.) 593s - quoted strings 593s - embedded comments 593s 593s 593s Getting Started - 593s ----------------- 593s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 593s see the base classes that most other pyparsing 593s classes inherit from. Use the docstrings for examples of how to: 593s 593s - construct literal match expressions from :class:`Literal` and 593s :class:`CaselessLiteral` classes 593s - construct character word-group expressions using the :class:`Word` 593s class 593s - see how to create repetitive expressions using :class:`ZeroOrMore` 593s and :class:`OneOrMore` classes 593s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 593s and :class:`'&'` operators to combine simple expressions into 593s more complex ones 593s - associate names with your parsed results using 593s :class:`ParserElement.set_results_name` 593s - access the parsed data, which is returned as a :class:`ParseResults` 593s object 593s - find some helpful expression short-cuts like :class:`DelimitedList` 593s and :class:`one_of` 593s - find more useful common expressions in the :class:`pyparsing_common` 593s namespace class 593s """ 593s from typing import NamedTuple 593s 593s 593s class version_info(NamedTuple): 593s major: int 593s minor: int 593s micro: int 593s releaselevel: str 593s serial: int 593s 593s @property 593s def __version__(self): 593s return ( 593s f"{self.major}.{self.minor}.{self.micro}" 593s + ( 593s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 593s "", 593s )[self.releaselevel == "final"] 593s ) 593s 593s def __str__(self): 593s return f"{__name__} {self.__version__} / {__version_time__}" 593s 593s def __repr__(self): 593s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 593s 593s 593s __version_info__ = version_info(3, 1, 3, "final", 1) 593s __version_time__ = "24 Aug 2024 23:47 UTC" 593s __version__ = __version_info__.__version__ 593s __versionTime__ = __version_time__ 593s __author__ = "Paul McGuire " 593s 593s from .util import * 593s from .exceptions import * 593s from .actions import * 593s > from .core import __diag__, __compat__ 593s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 593s E return f"{type(self).__name__}: {retString}" 593s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 593s E SyntaxError: 'return' in a 'finally' block 593s 593s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 593s _______ ERROR at setup of TestValidate.test_validate_examples[example27] _______ 593s 593s request = > 593s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 593s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 593s record_mode = 'none', disable_recording = False 593s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 593s 593s @pytest.fixture(autouse=True) # type: ignore 593s def vcr( 593s request: SubRequest, 593s vcr_markers: List[Mark], 593s vcr_cassette_dir: str, 593s record_mode: str, 593s disable_recording: bool, 593s pytestconfig: Config, 593s ) -> Iterator[Optional["Cassette"]]: 593s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 593s if disable_recording: 593s yield None 593s elif vcr_markers: 593s > from ._vcr import use_cassette 593s 593s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 593s from vcr import VCR 593s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 593s from .config import VCR 593s /usr/lib/python3/dist-packages/vcr/config.py:10: in 593s from .cassette import Cassette 593s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 593s from .patch import CassettePatcherBuilder 593s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 593s import httplib2 593s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 593s from . import auth 593s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 593s import pyparsing as pp 593s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 593s 593s # module pyparsing.py 593s # 593s # Copyright (c) 2003-2022 Paul T. McGuire 593s # 593s # Permission is hereby granted, free of charge, to any person obtaining 593s # a copy of this software and associated documentation files (the 593s # "Software"), to deal in the Software without restriction, including 593s # without limitation the rights to use, copy, modify, merge, publish, 593s # distribute, sublicense, and/or sell copies of the Software, and to 593s # permit persons to whom the Software is furnished to do so, subject to 593s # the following conditions: 593s # 593s # The above copyright notice and this permission notice shall be 593s # included in all copies or substantial portions of the Software. 593s # 593s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 593s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 593s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 593s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 593s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 593s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593s # 593s 593s __doc__ = """ 593s pyparsing module - Classes and methods to define and execute parsing grammars 593s ============================================================================= 593s 593s The pyparsing module is an alternative approach to creating and 593s executing simple grammars, vs. the traditional lex/yacc approach, or the 593s use of regular expressions. With pyparsing, you don't need to learn 593s a new syntax for defining grammars or matching expressions - the parsing 593s module provides a library of classes that you use to construct the 593s grammar directly in Python. 593s 593s Here is a program to parse "Hello, World!" (or any greeting of the form 593s ``", !"``), built up using :class:`Word`, 593s :class:`Literal`, and :class:`And` elements 593s (the :meth:`'+'` operators create :class:`And` expressions, 593s and the strings are auto-converted to :class:`Literal` expressions):: 593s 593s from pyparsing import Word, alphas 593s 593s # define grammar of a greeting 593s greet = Word(alphas) + "," + Word(alphas) + "!" 593s 593s hello = "Hello, World!" 593s print(hello, "->", greet.parse_string(hello)) 593s 593s The program outputs the following:: 593s 593s Hello, World! -> ['Hello', ',', 'World', '!'] 593s 593s The Python representation of the grammar is quite readable, owing to the 593s self-explanatory class names, and the use of :class:`'+'`, 593s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 593s 593s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example28] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example29] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example30] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example31] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example32] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example33] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example34] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example35] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example36] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example37] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example38] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example39] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example40] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example41] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example42] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example43] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example44] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example45] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example46] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example47] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example48] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example49] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example50] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example51] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example52] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example53] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example54] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example55] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example56] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example57] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example58] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example59] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example60] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example61] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example62] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example63] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example64] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example65] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example66] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example67] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example68] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example69] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example70] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example71] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example72] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example73] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example74] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example75] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example76] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example77] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example78] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example79] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example80] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example81] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example82] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example83] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example84] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example85] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example86] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example87] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example88] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example89] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example90] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example91] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example92] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example93] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example94] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example95] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example96] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example97] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example98] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_examples[example99] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example100] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example101] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example102] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example103] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example104] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example105] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example106] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example107] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example108] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example109] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example110] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example111] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example112] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example113] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example114] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example115] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example116] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example117] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example118] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example119] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example120] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example121] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example122] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example123] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_examples[example124] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_error_contains_href _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _____ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg _____ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg_missing_href _ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______ ERROR at setup of TestValidate.test_validate_all_unexpected_href _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _______________ ERROR at setup of TestValidate.test_validate_all _______________ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case0] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case1] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case2] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case3] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case4] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case5] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case6] _______ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s _ ERROR at setup of TestValidate.test_validates_geojson_with_tuple_coordinates _ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s ________ ERROR at setup of TestValidate.test_validate_custom_validator _________ 594s 594s request = > 594s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 594s vcr_cassette_dir = '/tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 594s record_mode = 'none', disable_recording = False 594s pytestconfig = <_pytest.config.Config object at 0xf74d24bb46e0> 594s 594s @pytest.fixture(autouse=True) # type: ignore 594s def vcr( 594s request: SubRequest, 594s vcr_markers: List[Mark], 594s vcr_cassette_dir: str, 594s record_mode: str, 594s disable_recording: bool, 594s pytestconfig: Config, 594s ) -> Iterator[Optional["Cassette"]]: 594s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 594s if disable_recording: 594s yield None 594s elif vcr_markers: 594s > from ._vcr import use_cassette 594s 594s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 594s from vcr import VCR 594s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 594s from .config import VCR 594s /usr/lib/python3/dist-packages/vcr/config.py:10: in 594s from .cassette import Cassette 594s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 594s from .patch import CassettePatcherBuilder 594s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 594s import httplib2 594s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 594s from . import auth 594s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 594s import pyparsing as pp 594s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 594s 594s # module pyparsing.py 594s # 594s # Copyright (c) 2003-2022 Paul T. McGuire 594s # 594s # Permission is hereby granted, free of charge, to any person obtaining 594s # a copy of this software and associated documentation files (the 594s # "Software"), to deal in the Software without restriction, including 594s # without limitation the rights to use, copy, modify, merge, publish, 594s # distribute, sublicense, and/or sell copies of the Software, and to 594s # permit persons to whom the Software is furnished to do so, subject to 594s # the following conditions: 594s # 594s # The above copyright notice and this permission notice shall be 594s # included in all copies or substantial portions of the Software. 594s # 594s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 594s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 594s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 594s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 594s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 594s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 594s # 594s 594s __doc__ = """ 594s pyparsing module - Classes and methods to define and execute parsing grammars 594s ============================================================================= 594s 594s The pyparsing module is an alternative approach to creating and 594s executing simple grammars, vs. the traditional lex/yacc approach, or the 594s use of regular expressions. With pyparsing, you don't need to learn 594s a new syntax for defining grammars or matching expressions - the parsing 594s module provides a library of classes that you use to construct the 594s grammar directly in Python. 594s 594s Here is a program to parse "Hello, World!" (or any greeting of the form 594s ``", !"``), built up using :class:`Word`, 594s :class:`Literal`, and :class:`And` elements 594s (the :meth:`'+'` operators create :class:`And` expressions, 594s and the strings are auto-converted to :class:`Literal` expressions):: 594s 594s from pyparsing import Word, alphas 594s 594s # define grammar of a greeting 594s greet = Word(alphas) + "," + Word(alphas) + "!" 594s 594s hello = "Hello, World!" 594s print(hello, "->", greet.parse_string(hello)) 594s 594s The program outputs the following:: 594s 594s Hello, World! -> ['Hello', ',', 'World', '!'] 594s 594s The Python representation of the grammar is quite readable, owing to the 594s self-explanatory class names, and the use of :class:`'+'`, 594s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 594s 594s The :class:`ParseResults` object returned from 594s :class:`ParserElement.parse_string` can be 594s accessed as a nested list, a dictionary, or an object with named 594s attributes. 594s 594s The pyparsing module handles some of the problems that are typically 594s vexing when writing text parsers: 594s 594s - extra or missing whitespace (the above program will also handle 594s "Hello,World!", "Hello , World !", etc.) 594s - quoted strings 594s - embedded comments 594s 594s 594s Getting Started - 594s ----------------- 594s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 594s see the base classes that most other pyparsing 594s classes inherit from. Use the docstrings for examples of how to: 594s 594s - construct literal match expressions from :class:`Literal` and 594s :class:`CaselessLiteral` classes 594s - construct character word-group expressions using the :class:`Word` 594s class 594s - see how to create repetitive expressions using :class:`ZeroOrMore` 594s and :class:`OneOrMore` classes 594s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 594s and :class:`'&'` operators to combine simple expressions into 594s more complex ones 594s - associate names with your parsed results using 594s :class:`ParserElement.set_results_name` 594s - access the parsed data, which is returned as a :class:`ParseResults` 594s object 594s - find some helpful expression short-cuts like :class:`DelimitedList` 594s and :class:`one_of` 594s - find more useful common expressions in the :class:`pyparsing_common` 594s namespace class 594s """ 594s from typing import NamedTuple 594s 594s 594s class version_info(NamedTuple): 594s major: int 594s minor: int 594s micro: int 594s releaselevel: str 594s serial: int 594s 594s @property 594s def __version__(self): 594s return ( 594s f"{self.major}.{self.minor}.{self.micro}" 594s + ( 594s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 594s "", 594s )[self.releaselevel == "final"] 594s ) 594s 594s def __str__(self): 594s return f"{__name__} {self.__version__} / {__version_time__}" 594s 594s def __repr__(self): 594s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 594s 594s 594s __version_info__ = version_info(3, 1, 3, "final", 1) 594s __version_time__ = "24 Aug 2024 23:47 UTC" 594s __version__ = __version_info__.__version__ 594s __versionTime__ = __version_time__ 594s __author__ = "Paul McGuire " 594s 594s from .util import * 594s from .exceptions import * 594s from .actions import * 594s > from .core import __diag__, __compat__ 594s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 594s E return f"{type(self).__name__}: {retString}" 594s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 594s E SyntaxError: 'return' in a 'finally' block 594s 594s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 594s =========================== short test summary info ============================ 594s ERROR tests/extensions/test_classification.py::test_apply_bitfields - File ... 594s ERROR tests/extensions/test_classification.py::test_apply_classes - File "/... 594s ERROR tests/extensions/test_classification.py::test_validate_classification 594s ERROR tests/extensions/test_datacube.py::test_validate - File "/usr/lib/pyt... 594s ERROR tests/extensions/test_datacube.py::test_set_variables - File "/usr/li... 594s ERROR tests/extensions/test_datacube.py::test_set_dimensions - File "/usr/l... 594s ERROR tests/extensions/test_eo.py::test_validate_eo - File "/usr/lib/python... 594s ERROR tests/extensions/test_eo.py::test_bands - File "/usr/lib/python3/dist... 594s ERROR tests/extensions/test_eo.py::test_asset_bands - File "/usr/lib/python... 594s ERROR tests/extensions/test_eo.py::test_cloud_cover - File "/usr/lib/python... 594s ERROR tests/extensions/test_eo.py::test_set_field[cloud_cover-7.8] - File "... 594s ERROR tests/extensions/test_eo.py::test_set_field[snow_cover-99] - File "/u... 594s ERROR tests/extensions/test_file.py::test_validate_item - File "/usr/lib/py... 594s ERROR tests/extensions/test_file.py::test_validate_collection - File "/usr/... 594s ERROR tests/extensions/test_file.py::test_validate_catalog - File "/usr/lib... 594s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-size-1] 594s ERROR tests/extensions/test_file.py::test_set_field_on_asset[measurement-header_size-8192] 594s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] 594s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-byte_order-little-endian] 594s ERROR tests/extensions/test_file.py::test_set_field_on_asset[calibrations-local_path-different-file.xml] 594s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-size-129302] 594s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-header_size-4092] 594s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] 594s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-byte_order-big-endian] 594s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-local_path-a/path] 594s ERROR tests/extensions/test_file.py::test_migrate_from_v2_0_0 - File "/usr/... 594s ERROR tests/extensions/test_file.py::test_migrate_from_v1_0_0 - File "/usr/... 594s ERROR tests/extensions/test_grid.py::test_attributes - File "/usr/lib/pytho... 594s ERROR tests/extensions/test_grid.py::test_modify - File "/usr/lib/python3/d... 594s ERROR tests/extensions/test_mgrs.py::test_validate - File "/usr/lib/python3... 594s ERROR tests/extensions/test_mgrs.py::test_set_field[latitude_band-C] - File... 594s ERROR tests/extensions/test_mgrs.py::test_set_field[grid_square-ZA] - File ... 594s ERROR tests/extensions/test_mgrs.py::test_set_field[utm_zone-59] - File "/u... 594s ERROR tests/extensions/test_mlm.py::test_apply - File "/usr/lib/python3/dis... 594s ERROR tests/extensions/test_mlm.py::test_validate_mlm - File "/usr/lib/pyth... 594s ERROR tests/extensions/test_pointcloud.py::test_validate_pointcloud - File ... 594s ERROR tests/extensions/test_pointcloud.py::test_count - File "/usr/lib/pyth... 594s ERROR tests/extensions/test_pointcloud.py::test_type - File "/usr/lib/pytho... 594s ERROR tests/extensions/test_pointcloud.py::test_encoding - File "/usr/lib/p... 594s ERROR tests/extensions/test_pointcloud.py::test_schemas - File "/usr/lib/py... 594s ERROR tests/extensions/test_pointcloud.py::test_statistics - File "/usr/lib... 594s ERROR tests/extensions/test_pointcloud.py::test_density - File "/usr/lib/py... 594s ERROR tests/extensions/test_projection.py::test_partial_apply - File "/usr/... 594s ERROR tests/extensions/test_projection.py::test_validate_proj - File "/usr/... 594s ERROR tests/extensions/test_projection.py::test_epsg - File "/usr/lib/pytho... 594s ERROR tests/extensions/test_projection.py::test_wkt2 - File "/usr/lib/pytho... 594s ERROR tests/extensions/test_projection.py::test_projjson - File "/usr/lib/p... 594s ERROR tests/extensions/test_projection.py::test_geometry - File "/usr/lib/p... 594s ERROR tests/extensions/test_projection.py::test_bbox - File "/usr/lib/pytho... 594s ERROR tests/extensions/test_projection.py::test_centroid - File "/usr/lib/p... 594s ERROR tests/extensions/test_projection.py::test_shape - File "/usr/lib/pyth... 594s ERROR tests/extensions/test_projection.py::test_transform - File "/usr/lib/... 594s ERROR tests/extensions/test_projection.py::test_get_set_code - File "/usr/l... 594s ERROR tests/extensions/test_raster.py::test_validate_raster - File "/usr/li... 594s ERROR tests/extensions/test_raster.py::test_asset_bands - File "/usr/lib/py... 594s ERROR tests/extensions/test_render.py::test_item_validate - File "/usr/lib/... 594s ERROR tests/extensions/test_render.py::test_collection_validate - File "/us... 594s ERROR tests/extensions/test_sar.py::test_required - File "/usr/lib/python3/... 594s ERROR tests/extensions/test_sar.py::test_all - File "/usr/lib/python3/dist-... 594s ERROR tests/extensions/test_sat.py::test_no_args_fails - File "/usr/lib/pyt... 594s ERROR tests/extensions/test_sat.py::test_orbit_state - File "/usr/lib/pytho... 594s ERROR tests/extensions/test_sat.py::test_relative_orbit - File "/usr/lib/py... 594s ERROR tests/extensions/test_sat.py::test_absolute_orbit - File "/usr/lib/py... 594s ERROR tests/extensions/test_sat.py::test_anx_datetime - File "/usr/lib/pyth... 594s ERROR tests/extensions/test_sat.py::test_platform_international_designator - ... 594s ERROR tests/extensions/test_sat.py::test_relative_orbit_no_negative - File ... 594s ERROR tests/extensions/test_sat.py::test_both - File "/usr/lib/python3/dist... 594s ERROR tests/extensions/test_sat.py::test_modify - File "/usr/lib/python3/di... 594s ERROR tests/extensions/test_sat.py::test_clear_orbit_state - File "/usr/lib... 594s ERROR tests/extensions/test_sat.py::test_clear_relative_orbit - File "/usr/... 594s ERROR tests/extensions/test_scientific.py::test_doi - File "/usr/lib/python... 594s ERROR tests/extensions/test_scientific.py::test_citation - File "/usr/lib/p... 594s ERROR tests/extensions/test_scientific.py::test_publications_one - File "/u... 594s ERROR tests/extensions/test_scientific.py::test_publications - File "/usr/l... 594s ERROR tests/extensions/test_scientific.py::test_remove_publication_one - Fi... 594s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_one 594s ERROR tests/extensions/test_scientific.py::test_remove_publication_forward - ... 594s ERROR tests/extensions/test_scientific.py::test_remove_publication_reverse - ... 594s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_some 594s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_none 594s ERROR tests/extensions/test_scientific.py::test_collection_doi - File "/usr... 594s ERROR tests/extensions/test_scientific.py::test_collection_citation - File ... 594s ERROR tests/extensions/test_scientific.py::test_collection_publications_one 594s ERROR tests/extensions/test_scientific.py::test_collection_publications - F... 594s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_one 594s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_one 594s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_forward 594s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_reverse 594s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_some 594s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_none 594s ERROR tests/extensions/test_storage.py::test_validate_storage - File "/usr/... 594s ERROR tests/extensions/test_storage.py::test_asset_platform - File "/usr/li... 594s ERROR tests/extensions/test_storage.py::test_asset_region - File "/usr/lib/... 594s ERROR tests/extensions/test_storage.py::test_asset_requester_pays - File "/... 594s ERROR tests/extensions/test_storage.py::test_asset_tier - File "/usr/lib/py... 594s ERROR tests/extensions/test_table.py::test_validate - File "/usr/lib/python... 594s ERROR tests/extensions/test_timestamps.py::test_validate_timestamps - File ... 594s ERROR tests/extensions/test_timestamps.py::test_expires - File "/usr/lib/py... 594s ERROR tests/extensions/test_timestamps.py::test_published - File "/usr/lib/... 594s ERROR tests/extensions/test_timestamps.py::test_unpublished - File "/usr/li... 594s ERROR tests/extensions/test_version.py::test_add_version - File "/usr/lib/p... 594s ERROR tests/extensions/test_version.py::test_version_in_properties - File "... 594s ERROR tests/extensions/test_version.py::test_add_not_deprecated_version - F... 594s ERROR tests/extensions/test_version.py::test_add_deprecated_version - File ... 594s ERROR tests/extensions/test_version.py::test_latest - File "/usr/lib/python... 594s ERROR tests/extensions/test_version.py::test_predecessor - File "/usr/lib/p... 594s ERROR tests/extensions/test_version.py::test_successor - File "/usr/lib/pyt... 594s ERROR tests/extensions/test_version.py::test_all_links - File "/usr/lib/pyt... 594s ERROR tests/extensions/test_version.py::test_collection_add_version - File ... 594s ERROR tests/extensions/test_version.py::test_collection_validate_all - File... 594s ERROR tests/extensions/test_version.py::test_catalog_add_version - File "/u... 594s ERROR tests/extensions/test_version.py::test_catalog_validate_all - File "/... 594s ERROR tests/extensions/test_version.py::test_optional_version - File "/usr/... 594s ERROR tests/extensions/test_version.py::test_assets - File "/usr/lib/python... 594s ERROR tests/extensions/test_view.py::test_validate_view - File "/usr/lib/py... 594s ERROR tests/extensions/test_view.py::test_off_nadir - File "/usr/lib/python... 594s ERROR tests/extensions/test_view.py::test_incidence_angle - File "/usr/lib/... 594s ERROR tests/extensions/test_view.py::test_azimuth - File "/usr/lib/python3/... 594s ERROR tests/extensions/test_view.py::test_sun_azimuth - File "/usr/lib/pyth... 594s ERROR tests/extensions/test_view.py::test_sun_elevation - File "/usr/lib/py... 594s ERROR tests/extensions/test_xarray_assets.py::test_item_validate - File "/u... 594s ERROR tests/extensions/test_xarray_assets.py::test_collection_validate - Fi... 594s ERROR tests/extensions/test_xarray_assets.py::test_set_field[storage_options-value0] 594s ERROR tests/extensions/test_xarray_assets.py::test_set_field[open_kwargs-value1] 594s ERROR tests/test_catalog.py::TestCatalog::test_read_remote - File "/usr/lib... 594s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat0] - File "/... 594s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat1] - File "/... 594s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat2] - File "/... 594s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat3] - File "/... 594s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat4] - File "/... 594s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat5] - File "/... 594s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat6] - File "/... 594s ERROR tests/test_catalog.py::TestCatalog::test_validate_all_invalid - File ... 594s ERROR tests/test_catalog.py::test_validate_all_with_max_n - File "/usr/lib/... 594s ERROR tests/test_catalog.py::test_validate_all_with_recusive_off - File "/u... 594s ERROR tests/test_item.py::test_null_datetime - File "/usr/lib/python3/dist-... 594s ERROR tests/test_item.py::test_null_datetime_constructor - File "/usr/lib/p... 594s ERROR tests/test_item.py::test_null_geometry - File "/usr/lib/python3/dist-... 594s ERROR tests/test_item.py::test_relative_extension_path - File "/usr/lib/pyt... 594s ERROR tests/test_item.py::test_non_hierarchical_relative_link - File "/usr/... 594s ERROR tests/test_stac_io.py::test_retry_stac_io - File "/usr/lib/python3/di... 594s ERROR tests/test_stac_io.py::test_retry_stac_io_404 - File "/usr/lib/python... 594s ERROR tests/test_stac_io.py::test_urls_with_non_ascii_characters - File "/u... 594s ERROR tests/test_stac_io.py::test_proj_json_schema_is_readable - File "/usr... 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog0] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog1] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog2] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog3] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog4] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog5] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog6] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog0] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog1] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog2] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog3] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog4] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog5] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog6] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog0] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog1] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog2] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog3] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog4] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog5] 594s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog6] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_current_version 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example0] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example1] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example2] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example3] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example4] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example5] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example6] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example7] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example8] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example9] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example10] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example11] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example12] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example13] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example14] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example15] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example16] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example17] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example18] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example19] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example20] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example21] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example22] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example23] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example24] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example25] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example26] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example27] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example28] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example29] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example30] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example31] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example32] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example33] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example34] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example35] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example36] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example37] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example38] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example39] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example40] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example41] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example42] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example43] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example44] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example45] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example46] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example47] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example48] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example49] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example50] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example51] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example52] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example53] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example54] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example55] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example56] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example57] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example58] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example59] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example60] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example61] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example62] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example63] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example64] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example65] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example66] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example67] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example68] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example69] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example70] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example71] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example72] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example73] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example74] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example75] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example76] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example77] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example78] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example79] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example80] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example81] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example82] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example83] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example84] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example85] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example86] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example87] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example88] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example89] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example90] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example91] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example92] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example93] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example94] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example95] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example96] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example97] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example98] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example99] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example100] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example101] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example102] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example103] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example104] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example105] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example106] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example107] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example108] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example109] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example110] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example111] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example112] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example113] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example114] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example115] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example116] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example117] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example118] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example119] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example120] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example121] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example122] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example123] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example124] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_error_contains_href 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg_missing_href 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_unexpected_href 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all - ... 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case0] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case1] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case2] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case3] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case4] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case5] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case6] 594s ERROR tests/validation/test_validate.py::TestValidate::test_validates_geojson_with_tuple_coordinates 594s ERROR tests/validation/test_validate.py::TestValidate::test_validate_custom_validator 594s ================ 1234 passed, 18 skipped, 305 errors in 47.20s ================= 594s E: pybuild pybuild:483: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.8zlcFW/autopkgtest_tmp/build; python3.14 -m pytest tests 595s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p "3.13 3.14" returned exit code 13 595s make: *** [/tmp/IZMALCNsZp/run:4: pybuild-autopkgtest] Error 25 595s pybuild-autopkgtest: error: /tmp/IZMALCNsZp/run pybuild-autopkgtest returned exit code 2 595s autopkgtest [21:10:22]: test pybuild-autopkgtest: -----------------------] 596s pybuild-autopkgtest FAIL non-zero exit status 25 596s autopkgtest [21:10:23]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 597s autopkgtest [21:10:24]: @@@@@@@@@@@@@@@@@@@@ summary 597s pybuild-autopkgtest FAIL non-zero exit status 25