0s autopkgtest [19:52:26]: starting date and time: 2026-01-22 19:52:26+0000 0s autopkgtest [19:52:26]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [19:52:26]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.0m6c5m01/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-ppc64el --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-15@sto01-ppc64el-22.secgroup --name adt-resolute-ppc64el-pystac-20260122-195226-juju-7f2275-prod-proposed-migration-environment-15-c76cb1a9-ac0d-497c-a18a-4df9d4aa4180 --image adt/ubuntu-resolute-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --net-id=net_prod-autopkgtest-workers-ppc64el -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 3s Creating nova instance adt-resolute-ppc64el-pystac-20260122-195226-juju-7f2275-prod-proposed-migration-environment-15-c76cb1a9-ac0d-497c-a18a-4df9d4aa4180 from image adt/ubuntu-resolute-ppc64el-server-20260122.img (UUID 987e5803-394f-43eb-a969-151b6b75a57a)... 62s autopkgtest [19:53:28]: testbed dpkg architecture: ppc64el 62s autopkgtest [19:53:28]: testbed apt version: 3.1.12 62s autopkgtest [19:53:28]: @@@@@@@@@@@@@@@@@@@@ test bed setup 62s autopkgtest [19:53:28]: testbed release detected to be: None 63s autopkgtest [19:53:29]: updating testbed package index (apt update) 63s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 63s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 64s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 64s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 64s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1011 kB] 64s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [2820 B] 64s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [22.2 kB] 64s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [81.6 kB] 64s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el Packages [100 kB] 64s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe ppc64el Packages [703 kB] 64s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse ppc64el Packages [5552 B] 64s Fetched 2050 kB in 1s (2685 kB/s) 65s Reading package lists... 66s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 66s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 66s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 66s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 66s Reading package lists... 66s Reading package lists... 67s Building dependency tree... 67s Reading state information... 67s Calculating upgrade... 67s The following packages were automatically installed and are no longer required: 67s python3.13 python3.13-minimal 67s Use 'sudo apt autoremove' to remove them. 67s The following NEW packages will be installed: 67s libpython3.14-minimal libpython3.14-stdlib python3.14 python3.14-minimal 67s The following packages will be upgraded: 67s libplymouth5 libpython3-stdlib plymouth plymouth-theme-ubuntu-text python3 67s python3-gdbm python3-minimal 67s 7 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. 67s Need to get 7312 kB of archives. 67s After this operation, 27.7 MB of additional disk space will be used. 67s Get:1 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpython3.14-minimal ppc64el 3.14.2-1 [921 kB] 67s Get:2 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3.14-minimal ppc64el 3.14.2-1 [2712 kB] 67s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el python3-gdbm ppc64el 3.14.2-1 [11.1 kB] 67s Get:4 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el python3-minimal ppc64el 3.14.2-1 [28.2 kB] 67s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el python3 ppc64el 3.14.2-1 [22.9 kB] 67s Get:6 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpython3.14-stdlib ppc64el 3.14.2-1 [2444 kB] 67s Get:7 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3.14 ppc64el 3.14.2-1 [816 kB] 67s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el libpython3-stdlib ppc64el 3.14.2-1 [10.9 kB] 67s Get:9 http://ftpmaster.internal/ubuntu resolute/main ppc64el libplymouth5 ppc64el 24.004.60+git20250831.4a3c171d-0ubuntu4 [174 kB] 67s Get:10 http://ftpmaster.internal/ubuntu resolute/main ppc64el plymouth-theme-ubuntu-text ppc64el 24.004.60+git20250831.4a3c171d-0ubuntu4 [11.2 kB] 67s Get:11 http://ftpmaster.internal/ubuntu resolute/main ppc64el plymouth ppc64el 24.004.60+git20250831.4a3c171d-0ubuntu4 [160 kB] 68s dpkg-preconfigure: unable to re-open stdin: No such file or directory 68s Fetched 7312 kB in 1s (14.5 MB/s) 68s Selecting previously unselected package libpython3.14-minimal:ppc64el. 68s (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 ... 120824 files and directories currently installed.) 68s Preparing to unpack .../libpython3.14-minimal_3.14.2-1_ppc64el.deb ... 68s Unpacking libpython3.14-minimal:ppc64el (3.14.2-1) ... 68s Selecting previously unselected package python3.14-minimal. 68s Preparing to unpack .../python3.14-minimal_3.14.2-1_ppc64el.deb ... 68s Unpacking python3.14-minimal (3.14.2-1) ... 68s Preparing to unpack .../python3-gdbm_3.14.2-1_ppc64el.deb ... 68s Unpacking python3-gdbm (3.14.2-1) over (3.13.9-1) ... 68s Setting up libpython3.14-minimal:ppc64el (3.14.2-1) ... 69s Setting up python3.14-minimal (3.14.2-1) ... 70s (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 ... 121166 files and directories currently installed.) 70s Preparing to unpack .../python3-minimal_3.14.2-1_ppc64el.deb ... 70s Unpacking python3-minimal (3.14.2-1) over (3.13.7-1) ... 70s Setting up python3-minimal (3.14.2-1) ... 70s (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 ... 121166 files and directories currently installed.) 70s Preparing to unpack .../0-python3_3.14.2-1_ppc64el.deb ... 70s running python pre-rtupdate hooks for python3.14... 70s Unpacking python3 (3.14.2-1) over (3.13.7-1) ... 70s Selecting previously unselected package libpython3.14-stdlib:ppc64el. 70s Preparing to unpack .../1-libpython3.14-stdlib_3.14.2-1_ppc64el.deb ... 70s Unpacking libpython3.14-stdlib:ppc64el (3.14.2-1) ... 71s Selecting previously unselected package python3.14. 71s Preparing to unpack .../2-python3.14_3.14.2-1_ppc64el.deb ... 71s Unpacking python3.14 (3.14.2-1) ... 71s Preparing to unpack .../3-libpython3-stdlib_3.14.2-1_ppc64el.deb ... 71s Unpacking libpython3-stdlib:ppc64el (3.14.2-1) over (3.13.7-1) ... 71s Preparing to unpack .../4-libplymouth5_24.004.60+git20250831.4a3c171d-0ubuntu4_ppc64el.deb ... 71s Unpacking libplymouth5:ppc64el (24.004.60+git20250831.4a3c171d-0ubuntu4) over (24.004.60+git20250831.4a3c171d-0ubuntu3) ... 71s Preparing to unpack .../5-plymouth-theme-ubuntu-text_24.004.60+git20250831.4a3c171d-0ubuntu4_ppc64el.deb ... 71s Unpacking plymouth-theme-ubuntu-text (24.004.60+git20250831.4a3c171d-0ubuntu4) over (24.004.60+git20250831.4a3c171d-0ubuntu3) ... 71s Preparing to unpack .../6-plymouth_24.004.60+git20250831.4a3c171d-0ubuntu4_ppc64el.deb ... 71s Unpacking plymouth (24.004.60+git20250831.4a3c171d-0ubuntu4) over (24.004.60+git20250831.4a3c171d-0ubuntu3) ... 72s Setting up libpython3.14-stdlib:ppc64el (3.14.2-1) ... 72s Setting up libplymouth5:ppc64el (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 72s Setting up python3.14 (3.14.2-1) ... 74s Setting up libpython3-stdlib:ppc64el (3.14.2-1) ... 74s Setting up python3-gdbm (3.14.2-1) ... 74s Setting up plymouth (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 74s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 74s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 75s Setting up python3 (3.14.2-1) ... 75s running python rtupdate hooks for python3.14... 75s running python post-rtupdate hooks for python3.14... 75s Processing triggers for libc-bin (2.42-2ubuntu4) ... 75s Processing triggers for systemd (259-1ubuntu2) ... 75s Processing triggers for man-db (2.13.1-1) ... 77s Processing triggers for initramfs-tools (0.150ubuntu7) ... 77s update-initramfs: Generating /boot/initrd.img-6.18.0-9-generic 86s Setting up plymouth-theme-ubuntu-text (24.004.60+git20250831.4a3c171d-0ubuntu4) ... 86s Processing triggers for initramfs-tools (0.150ubuntu7) ... 86s update-initramfs: Generating /boot/initrd.img-6.18.0-9-generic 91s autopkgtest [19:53:57]: upgrading testbed (apt dist-upgrade and autopurge) 92s Reading package lists... 92s Building dependency tree... 92s Reading state information... 92s Calculating upgrade... 92s The following packages were automatically installed and are no longer required: 92s python3.13 python3.13-minimal 92s Use 'sudo apt autoremove' to remove them. 92s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 92s Reading package lists... 92s Building dependency tree... 92s Reading state information... 92s Solving dependencies... 92s The following packages will be REMOVED: 92s python3.13* python3.13-minimal* 93s 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. 93s After this operation, 9077 kB disk space will be freed. 93s (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 ... 121596 files and directories currently installed.) 93s Removing python3.13 (3.13.11-1) ... 93s Removing python3.13-minimal (3.13.11-1) ... 94s Processing triggers for man-db (2.13.1-1) ... 94s Processing triggers for systemd (259-1ubuntu2) ... 94s (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 ... 121569 files and directories currently installed.) 94s Purging configuration files for python3.13-minimal (3.13.11-1) ... 95s autopkgtest [19:54:01]: rebooting testbed after setup commands that affected boot 133s autopkgtest [19:54:39]: testbed running kernel: Linux 6.18.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 12 16:45:54 UTC 2026 135s autopkgtest [19:54:41]: @@@@@@@@@@@@@@@@@@@@ apt-source pystac 137s Get:1 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (dsc) [3523 B] 137s Get:2 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (tar) [2455 kB] 137s Get:3 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (diff) [27.7 kB] 137s gpgv: Signature made Sat Jan 10 12:09:05 2026 UTC 137s gpgv: using RSA key 3B70F209A5FFD68903C472C5EBF48AB2578F9812 137s gpgv: issuer "antonio.valentino@tiscali.it" 137s gpgv: Can't check signature: No public key 137s dpkg-source: warning: cannot verify inline signature for ./pystac_1.14.3-1.dsc: no acceptable signature found 137s autopkgtest [19:54:43]: testing package pystac version 1.14.3-1 160s autopkgtest [19:55:06]: build not needed 161s autopkgtest [19:55:07]: test pybuild-autopkgtest: preparing testbed 161s Reading package lists... 162s Building dependency tree... 162s Reading state information... 162s Solving dependencies... 162s The following NEW packages will be installed: 162s autoconf automake autopoint autotools-dev build-essential cpp cpp-15 162s cpp-15-powerpc64le-linux-gnu cpp-powerpc64le-linux-gnu debhelper debugedit 162s dh-autoreconf dh-python dh-strip-nondeterminism docutils-common dwz 162s fontconfig-config fonts-dejavu-core fonts-dejavu-mono fonts-mathjax g++ 162s g++-15 g++-15-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu gcc gcc-15 162s gcc-15-powerpc64le-linux-gnu gcc-powerpc64le-linux-gnu gdal-data 162s gdal-plugins gettext intltool-debian libabsl20240722 libaec0 libaom3 162s libarchive-zip-perl libarmadillo14 libarpack2t64 libasan8 libavif16 libblas3 162s libblosc1 libcc1-0 libcfitsio10t64 libdav1d7 libde265-0 libdebhelper-perl 162s libdeflate0 libfile-stripnondeterminism-perl libfontconfig1 libfreexl1 162s libfyba0t64 libgav1-2 libgcc-15-dev libgdal36 libgeos-c1t64 libgeos3.14.1 162s libgeotiff5 libgfortran5 libgif7 libgomp1 libgpgmepp6t64 libhdf4-0-alt 162s libhdf5-310 libhdf5-hl-310 libheif-plugin-aomdec libheif-plugin-libde265 162s libheif1 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8 libjs-mathjax 162s libjson-perl libkmlbase1t64 libkmldom1t64 libkmlengine1t64 liblapack3 162s liblcms2-2 liblerc4 liblsan0 libltdl7 liblua5.4-0 libminizip1t64 libmpc3 162s libmysqlclient24 libnetcdf22 libnorm1t64 libodbc2 libodbcinst2 libogdi4.1 162s libopenjp2-7 libpgm-5.3-0t64 libpoppler147 libpq5 libproj25 libqhull-r8.0 162s libquadmath0 librttopo1 libsharpyuv0 libsnappy1v5 libsodium23 162s libspatialite8t64 libstdc++-15-dev libsz2 libtiff6 libtool libtsan2 162s libubsan1 liburiparser1 libwebp7 libxerces-c3.2t64 libyuv0 libzmq5 m4 162s mysql-common node-fortawesome-fontawesome-free pandoc pandoc-data po-debconf 162s proj-data pybuild-plugin-autopkgtest pybuild-plugin-pyproject 162s python-pystac-doc python-tinycss2-common python3-accessible-pygments 162s python3-affine python3-alabaster python3-all python3-anyio python3-astroid 162s python3-asttokens python3-bleach python3-bs4 python3-build python3-click 162s python3-click-plugins python3-cligj python3-colorama python3-decorator 162s python3-defusedxml python3-docutils python3-executing python3-fastjsonschema 162s python3-h11 python3-html5lib python3-imagesize python3-iniconfig 162s python3-installer python3-ipython python3-jedi python3-jupyter-client 162s python3-jupyter-core python3-jupyterlab-pygments python3-livereload 162s python3-matplotlib-inline python3-mistune python3-multidict python3-nbclient 162s python3-nbconvert python3-nbformat python3-nbsphinx python3-numpy 162s python3-numpy-dev python3-pandocfilters python3-parso python3-platformdirs 162s python3-pluggy python3-prompt-toolkit python3-propcache python3-psutil 162s python3-pure-eval python3-pydata-sphinx-theme python3-pyproject-hooks 162s python3-pystac python3-pytest python3-pytest-mock python3-pytest-recording 162s python3-rasterio python3-requests-mock python3-roman-numerals 162s python3-shapely python3-sniffio python3-snowballstemmer python3-soupsieve 162s python3-sphinx python3-sphinx-autobuild python3-sphinx-design 162s python3-stack-data python3-starlette python3-tinycss2 python3-tornado 162s python3-traitlets python3-typeshed python3-uvicorn python3-uvloop 162s python3-vcr python3-watchfiles python3-wcwidth python3-webencodings 162s python3-websockets python3-wheel python3-wrapt python3-wsproto python3-yarl 162s python3-zmq python3.13 python3.13-minimal sgml-base sphinx-common 162s unixodbc-common xml-core 162s 0 upgraded, 213 newly installed, 0 to remove and 0 not upgraded. 162s Need to get 182 MB of archives. 162s After this operation, 912 MB of additional disk space will be used. 162s Get:1 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3.13-minimal ppc64el 3.13.11-1 [2571 kB] 162s Get:2 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-numpy-dev ppc64el 1:2.3.5+ds-3 [153 kB] 162s Get:3 http://ftpmaster.internal/ubuntu resolute/main ppc64el libblas3 ppc64el 3.12.1-7ubuntu1 [291 kB] 162s Get:4 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgfortran5 ppc64el 15.2.0-11ubuntu1 [620 kB] 162s Get:5 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblapack3 ppc64el 3.12.1-7ubuntu1 [2960 kB] 162s Get:6 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-numpy ppc64el 1:2.3.5+ds-3 [5722 kB] 163s Get:7 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3.13 ppc64el 3.13.11-1 [758 kB] 163s Get:8 http://ftpmaster.internal/ubuntu resolute/main ppc64el m4 ppc64el 1.4.20-2 [236 kB] 163s Get:9 http://ftpmaster.internal/ubuntu resolute/main ppc64el autoconf all 2.72-3.1ubuntu1 [384 kB] 163s Get:10 http://ftpmaster.internal/ubuntu resolute/main ppc64el autotools-dev all 20240727.1 [43.4 kB] 163s Get:11 http://ftpmaster.internal/ubuntu resolute/main ppc64el automake all 1:1.18.1-3build1 [582 kB] 163s Get:12 http://ftpmaster.internal/ubuntu resolute/main ppc64el autopoint all 0.23.2-1 [620 kB] 163s Get:13 http://ftpmaster.internal/ubuntu resolute/main ppc64el libisl23 ppc64el 0.27-1build1 [893 kB] 163s Get:14 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmpc3 ppc64el 1.3.1-2 [62.5 kB] 163s Get:15 http://ftpmaster.internal/ubuntu resolute/main ppc64el cpp-15-powerpc64le-linux-gnu ppc64el 15.2.0-11ubuntu1 [11.4 MB] 163s Get:16 http://ftpmaster.internal/ubuntu resolute/main ppc64el cpp-15 ppc64el 15.2.0-11ubuntu1 [1038 B] 163s Get:17 http://ftpmaster.internal/ubuntu resolute/main ppc64el cpp-powerpc64le-linux-gnu ppc64el 4:15.2.0-4ubuntu1 [5746 B] 163s Get:18 http://ftpmaster.internal/ubuntu resolute/main ppc64el cpp ppc64el 4:15.2.0-4ubuntu1 [22.4 kB] 163s Get:19 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcc1-0 ppc64el 15.2.0-11ubuntu1 [49.0 kB] 163s Get:20 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgomp1 ppc64el 15.2.0-11ubuntu1 [169 kB] 163s Get:21 http://ftpmaster.internal/ubuntu resolute/main ppc64el libitm1 ppc64el 15.2.0-11ubuntu1 [32.2 kB] 163s Get:22 http://ftpmaster.internal/ubuntu resolute/main ppc64el libasan8 ppc64el 15.2.0-11ubuntu1 [3006 kB] 163s Get:23 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblsan0 ppc64el 15.2.0-11ubuntu1 [1374 kB] 163s Get:24 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtsan2 ppc64el 15.2.0-11ubuntu1 [2728 kB] 163s Get:25 http://ftpmaster.internal/ubuntu resolute/main ppc64el libubsan1 ppc64el 15.2.0-11ubuntu1 [1231 kB] 163s Get:26 http://ftpmaster.internal/ubuntu resolute/main ppc64el libquadmath0 ppc64el 15.2.0-11ubuntu1 [160 kB] 163s Get:27 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgcc-15-dev ppc64el 15.2.0-11ubuntu1 [1670 kB] 163s Get:28 http://ftpmaster.internal/ubuntu resolute/main ppc64el gcc-15-powerpc64le-linux-gnu ppc64el 15.2.0-11ubuntu1 [22.4 MB] 163s Get:29 http://ftpmaster.internal/ubuntu resolute/main ppc64el gcc-15 ppc64el 15.2.0-11ubuntu1 [528 kB] 164s Get:30 http://ftpmaster.internal/ubuntu resolute/main ppc64el gcc-powerpc64le-linux-gnu ppc64el 4:15.2.0-4ubuntu1 [1220 B] 164s Get:31 http://ftpmaster.internal/ubuntu resolute/main ppc64el gcc ppc64el 4:15.2.0-4ubuntu1 [5032 B] 164s Get:32 http://ftpmaster.internal/ubuntu resolute/main ppc64el libstdc++-15-dev ppc64el 15.2.0-11ubuntu1 [2745 kB] 164s Get:33 http://ftpmaster.internal/ubuntu resolute/main ppc64el g++-15-powerpc64le-linux-gnu ppc64el 15.2.0-11ubuntu1 [13.0 MB] 164s Get:34 http://ftpmaster.internal/ubuntu resolute/main ppc64el g++-15 ppc64el 15.2.0-11ubuntu1 [24.6 kB] 164s Get:35 http://ftpmaster.internal/ubuntu resolute/main ppc64el g++-powerpc64le-linux-gnu ppc64el 4:15.2.0-4ubuntu1 [970 B] 164s Get:36 http://ftpmaster.internal/ubuntu resolute/main ppc64el g++ ppc64el 4:15.2.0-4ubuntu1 [1092 B] 164s Get:37 http://ftpmaster.internal/ubuntu resolute/main ppc64el build-essential ppc64el 12.12ubuntu2 [5256 B] 164s Get:38 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdebhelper-perl all 13.28ubuntu1 [97.4 kB] 164s Get:39 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtool all 2.5.4-9 [169 kB] 164s Get:40 http://ftpmaster.internal/ubuntu resolute/main ppc64el dh-autoreconf all 21 [12.5 kB] 164s Get:41 http://ftpmaster.internal/ubuntu resolute/main ppc64el libarchive-zip-perl all 1.68-1 [90.2 kB] 164s Get:42 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfile-stripnondeterminism-perl all 1.15.0-1build1 [20.6 kB] 164s Get:43 http://ftpmaster.internal/ubuntu resolute/main ppc64el dh-strip-nondeterminism all 1.15.0-1build1 [5110 B] 164s Get:44 http://ftpmaster.internal/ubuntu resolute/main ppc64el debugedit ppc64el 1:5.2-3 [57.3 kB] 164s Get:45 http://ftpmaster.internal/ubuntu resolute/main ppc64el dwz ppc64el 0.16-2 [142 kB] 164s Get:46 http://ftpmaster.internal/ubuntu resolute/main ppc64el gettext ppc64el 0.23.2-1 [1177 kB] 164s Get:47 http://ftpmaster.internal/ubuntu resolute/main ppc64el intltool-debian all 0.35.0+20060710.6build1 [24.1 kB] 164s Get:48 http://ftpmaster.internal/ubuntu resolute/main ppc64el po-debconf all 1.0.22 [215 kB] 164s Get:49 http://ftpmaster.internal/ubuntu resolute/main ppc64el debhelper all 13.28ubuntu1 [916 kB] 164s Get:50 http://ftpmaster.internal/ubuntu resolute/universe ppc64el dh-python all 7.20251231 [122 kB] 164s Get:51 http://ftpmaster.internal/ubuntu resolute/main ppc64el sgml-base all 1.31+nmu1 [11.0 kB] 164s Get:52 http://ftpmaster.internal/ubuntu resolute/main ppc64el xml-core all 0.19build1 [20.3 kB] 164s Get:53 http://ftpmaster.internal/ubuntu resolute/main ppc64el docutils-common all 0.22.4+dfsg-1 [130 kB] 164s Get:54 http://ftpmaster.internal/ubuntu resolute/main ppc64el fonts-dejavu-mono all 2.37-8build1 [502 kB] 164s Get:55 http://ftpmaster.internal/ubuntu resolute/main ppc64el fonts-dejavu-core all 2.37-8build1 [834 kB] 164s Get:56 http://ftpmaster.internal/ubuntu resolute/main ppc64el fontconfig-config ppc64el 2.15.0-2.4ubuntu1 [38.2 kB] 164s Get:57 http://ftpmaster.internal/ubuntu resolute/main ppc64el fonts-mathjax all 2.7.9+dfsg-1build1 [2283 kB] 164s Get:58 http://ftpmaster.internal/ubuntu resolute/universe ppc64el gdal-data all 3.12.1+dfsg-1 [278 kB] 164s Get:59 http://ftpmaster.internal/ubuntu resolute/universe ppc64el gdal-plugins ppc64el 3.12.1+dfsg-1 [26.8 kB] 164s Get:60 http://ftpmaster.internal/ubuntu resolute/main ppc64el libabsl20240722 ppc64el 20240722.0-4ubuntu1 [662 kB] 164s Get:61 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libaec0 ppc64el 1.1.4-2 [30.3 kB] 164s Get:62 http://ftpmaster.internal/ubuntu resolute/main ppc64el libaom3 ppc64el 3.13.1-2 [2908 kB] 164s Get:63 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libarpack2t64 ppc64el 3.9.1-6 [107 kB] 164s Get:64 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libarmadillo14 ppc64el 1:14.2.3+dfsg-1 [109 kB] 164s Get:65 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libdav1d7 ppc64el 1.5.3-1 [600 kB] 164s Get:66 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libgav1-2 ppc64el 0.20.0-2 [897 kB] 164s Get:67 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjpeg-turbo8 ppc64el 2.1.5-4ubuntu2 [215 kB] 164s Get:68 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjpeg8 ppc64el 8c-2ubuntu11 [2148 B] 164s Get:69 http://ftpmaster.internal/ubuntu resolute/main ppc64el libyuv0 ppc64el 0.0.1922.20260106-1 [267 kB] 164s Get:70 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libavif16 ppc64el 1.3.0-1ubuntu3 [160 kB] 164s Get:71 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsnappy1v5 ppc64el 1.2.2-2 [33.5 kB] 164s Get:72 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libblosc1 ppc64el 1.21.5+ds-2 [35.0 kB] 164s Get:73 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libcfitsio10t64 ppc64el 4.6.3-1 [751 kB] 165s Get:74 http://ftpmaster.internal/ubuntu resolute/main ppc64el libde265-0 ppc64el 1.0.16-1build1 [300 kB] 165s Get:75 http://ftpmaster.internal/ubuntu resolute/main ppc64el libdeflate0 ppc64el 1.23-2 [63.3 kB] 165s Get:76 http://ftpmaster.internal/ubuntu resolute/main ppc64el libfontconfig1 ppc64el 2.15.0-2.4ubuntu1 [190 kB] 165s Get:77 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libfyba0t64 ppc64el 4.1.1-11build2 [149 kB] 165s Get:78 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libminizip1t64 ppc64el 1:1.3.dfsg+really1.3.1-1ubuntu2 [25.7 kB] 165s Get:79 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libfreexl1 ppc64el 2.0.0-1build3 [54.0 kB] 165s Get:80 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libgeos3.14.1 ppc64el 3.14.1-2 [1129 kB] 165s Get:81 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libgeos-c1t64 ppc64el 3.14.1-2 [124 kB] 165s Get:82 http://ftpmaster.internal/ubuntu resolute/universe ppc64el proj-data all 9.7.1-1 [7950 kB] 166s Get:83 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjbig0 ppc64el 2.1-6.1ubuntu3 [37.1 kB] 166s Get:84 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblerc4 ppc64el 4.0.0+ds-5ubuntu2 [315 kB] 166s Get:85 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsharpyuv0 ppc64el 1.5.0-0.1build1 [24.7 kB] 166s Get:86 http://ftpmaster.internal/ubuntu resolute/main ppc64el libwebp7 ppc64el 1.5.0-0.1build1 [330 kB] 166s Get:87 http://ftpmaster.internal/ubuntu resolute/main ppc64el libtiff6 ppc64el 4.7.0-3ubuntu3 [307 kB] 166s Get:88 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libproj25 ppc64el 9.7.1-1 [1580 kB] 166s Get:89 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libgeotiff5 ppc64el 1.7.4-1 [65.3 kB] 166s Get:90 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgif7 ppc64el 5.2.2-1ubuntu3 [40.9 kB] 166s Get:91 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libsz2 ppc64el 1.1.4-2 [5646 B] 166s Get:92 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf4-0-alt ppc64el 4.3.0-1 [337 kB] 166s Get:93 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf5-310 ppc64el 1.14.5+repack-4 [1543 kB] 166s Get:94 http://ftpmaster.internal/ubuntu resolute/main ppc64el libheif-plugin-aomdec ppc64el 1.21.2-1 [14.4 kB] 166s Get:95 http://ftpmaster.internal/ubuntu resolute/main ppc64el libheif-plugin-libde265 ppc64el 1.21.2-1 [10.2 kB] 166s Get:96 http://ftpmaster.internal/ubuntu resolute/main ppc64el libheif1 ppc64el 1.21.2-1 [657 kB] 166s Get:97 http://ftpmaster.internal/ubuntu resolute/universe ppc64el liburiparser1 ppc64el 0.9.8+dfsg-2 [52.7 kB] 166s Get:98 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libkmlbase1t64 ppc64el 1.3.0-13 [58.1 kB] 166s Get:99 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libkmldom1t64 ppc64el 1.3.0-13 [168 kB] 166s Get:100 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libkmlengine1t64 ppc64el 1.3.0-13 [78.7 kB] 166s Get:101 http://ftpmaster.internal/ubuntu resolute/main ppc64el mysql-common all 5.8+1.1.1ubuntu2 [7002 B] 166s Get:102 http://ftpmaster.internal/ubuntu resolute/main ppc64el libmysqlclient24 ppc64el 8.4.7-0ubuntu3 [1304 kB] 166s Get:103 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libhdf5-hl-310 ppc64el 1.14.5+repack-4 [76.2 kB] 166s Get:104 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libnetcdf22 ppc64el 1:4.9.3-1build1 [690 kB] 166s Get:105 http://ftpmaster.internal/ubuntu resolute/main ppc64el libltdl7 ppc64el 2.5.4-9 [51.5 kB] 166s Get:106 http://ftpmaster.internal/ubuntu resolute/main ppc64el libodbc2 ppc64el 2.3.14-1 [192 kB] 166s Get:107 http://ftpmaster.internal/ubuntu resolute/main ppc64el unixodbc-common all 2.3.14-1 [8792 B] 166s Get:108 http://ftpmaster.internal/ubuntu resolute/main ppc64el libodbcinst2 ppc64el 2.3.14-1 [39.3 kB] 166s Get:109 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libogdi4.1 ppc64el 4.1.1+ds-5 [257 kB] 166s Get:110 http://ftpmaster.internal/ubuntu resolute/main ppc64el libopenjp2-7 ppc64el 2.5.4-1 [251 kB] 166s Get:111 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgpgmepp6t64 ppc64el 1.24.2-3ubuntu2 [135 kB] 166s Get:112 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblcms2-2 ppc64el 2.17-1 [246 kB] 166s Get:113 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpoppler147 ppc64el 25.03.0-11.1 [1442 kB] 166s Get:114 http://ftpmaster.internal/ubuntu resolute/main ppc64el libpq5 ppc64el 18.1-2 [198 kB] 166s Get:115 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libqhull-r8.0 ppc64el 2020.2-8 [227 kB] 166s Get:116 http://ftpmaster.internal/ubuntu resolute/universe ppc64el librttopo1 ppc64el 1.1.0-4 [235 kB] 166s Get:117 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libspatialite8t64 ppc64el 5.1.0-3ubuntu1 [2237 kB] 166s Get:118 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libxerces-c3.2t64 ppc64el 3.2.4+debian-1.3build2 [1098 kB] 166s Get:119 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libgdal36 ppc64el 3.10.3+dfsg-1build3 [10.9 MB] 167s Get:120 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjson-perl all 4.10000-1 [81.9 kB] 167s Get:121 http://ftpmaster.internal/ubuntu resolute/main ppc64el liblua5.4-0 ppc64el 5.4.8-1 [213 kB] 167s Get:122 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libnorm1t64 ppc64el 1.5.9+dfsg-4 [198 kB] 167s Get:123 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libpgm-5.3-0t64 ppc64el 5.3.128~dfsg-2.1build2 [184 kB] 167s Get:124 http://ftpmaster.internal/ubuntu resolute/main ppc64el libsodium23 ppc64el 1.0.18-2 [160 kB] 167s Get:125 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libzmq5 ppc64el 4.3.5-1build3 [302 kB] 167s Get:126 http://ftpmaster.internal/ubuntu resolute/universe ppc64el node-fortawesome-fontawesome-free all 6.7.2+ds1-1 [1653 kB] 167s Get:127 http://ftpmaster.internal/ubuntu resolute/universe ppc64el pandoc-data all 3.1.11.1-3build1 [78.8 kB] 167s Get:128 http://ftpmaster.internal/ubuntu resolute/universe ppc64el pandoc ppc64el 3.1.11.1+ds-4 [30.9 MB] 167s Get:129 http://ftpmaster.internal/ubuntu resolute/universe ppc64el pybuild-plugin-autopkgtest all 7.20251231 [1748 B] 167s Get:130 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 167s Get:131 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-wheel all 0.46.1-2 [22.1 kB] 167s Get:132 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-build all 1.2.2-5 [30.9 kB] 167s Get:133 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 167s Get:134 http://ftpmaster.internal/ubuntu resolute/universe ppc64el pybuild-plugin-pyproject all 7.20251231 [1714 B] 167s Get:135 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python-pystac-doc all 1.14.3-1 [2276 kB] 167s Get:136 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python-tinycss2-common all 1.5.1-1 [47.3 kB] 167s Get:137 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-accessible-pygments all 0.0.5-2build1 [790 kB] 167s Get:138 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-affine all 2.4.0-2 [14.0 kB] 167s Get:139 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el python3-all ppc64el 3.14.2-1 [890 B] 167s Get:140 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-sniffio all 1.3.1-1 [7262 B] 167s Get:141 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-anyio all 4.11.0-3 [72.6 kB] 167s Get:142 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-astroid all 4.0.2-1ubuntu1 [172 kB] 167s Get:143 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-asttokens all 3.0.1-1 [20.7 kB] 167s Get:144 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-webencodings all 0.5.1-5build1 [11.7 kB] 167s Get:145 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-html5lib all 1.2-3 [90.6 kB] 167s Get:146 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-bleach all 6.3.0-1 [44.2 kB] 167s Get:147 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-soupsieve all 2.8.1-1 [33.7 kB] 167s Get:148 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-bs4 all 4.14.3-2build1 [84.8 kB] 167s Get:149 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-click all 8.2.0+0.really.8.1.8-1build1 [80.2 kB] 167s Get:150 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-click-plugins all 1.1.1-5 [9760 B] 167s Get:151 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-cligj all 0.7.2-3 [8006 B] 167s Get:152 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-colorama all 0.4.6-4build1 [32.2 kB] 167s Get:153 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-decorator all 5.2.1-2 [28.1 kB] 167s Get:154 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-defusedxml all 0.7.1-3build1 [42.4 kB] 167s Get:155 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-roman-numerals all 4.1.0-1 [8660 B] 167s Get:156 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-docutils all 0.22.4+dfsg-1 [439 kB] 167s Get:157 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-executing all 2.2.1-0.1 [26.2 kB] 167s Get:158 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-fastjsonschema all 2.21.1-1 [20.4 kB] 167s Get:159 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-h11 all 0.14.0-1.1 [51.6 kB] 167s Get:160 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-imagesize all 1.4.1-1build1 [6900 B] 167s Get:161 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-iniconfig all 2.1.0-2 [6962 B] 167s Get:162 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-parso all 0.8.5-1 [68.0 kB] 167s Get:163 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-typeshed all 0.0~git20241223.ea91db2-4 [1554 kB] 167s Get:164 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-jedi all 0.19.1+ds1-1build1 [694 kB] 167s Get:165 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-traitlets all 5.14.3+really5.14.3-2 [71.7 kB] 167s Get:166 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-matplotlib-inline all 0.2.1-1 [9462 B] 167s Get:167 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-wcwidth all 0.2.14+dfsg1-1build1 [26.5 kB] 167s Get:168 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-prompt-toolkit all 3.0.52-2 [258 kB] 167s Get:169 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pure-eval all 0.2.3-1 [11.4 kB] 167s Get:170 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-stack-data all 0.6.3-3 [22.2 kB] 167s Get:171 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-ipython all 8.35.0-2 [575 kB] 167s Get:172 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-platformdirs all 4.5.1-1 [17.1 kB] 167s Get:173 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-jupyter-core all 5.9.1-1 [28.9 kB] 167s Get:174 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-psutil ppc64el 7.1.0-1ubuntu1 [192 kB] 167s Get:175 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-tornado ppc64el 6.5.4-0.1 [306 kB] 167s Get:176 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-zmq ppc64el 27.1.0-1 [232 kB] 167s Get:177 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-jupyter-client all 8.7.0-1 [78.5 kB] 167s Get:178 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-jupyterlab-pygments all 0.2.2-3build1 [6188 B] 167s Get:179 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-livereload all 2.7.1-0.1 [22.7 kB] 167s Get:180 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-mistune all 3.1.4-1 [35.0 kB] 167s Get:181 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-multidict ppc64el 6.4.3-1build1 [74.0 kB] 167s Get:182 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-nbformat all 5.10.4-1 [39.2 kB] 167s Get:183 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-nbclient all 0.10.4-1 [22.6 kB] 167s Get:184 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-tinycss2 all 1.5.1-1 [23.3 kB] 167s Get:185 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pandocfilters all 1.5.1-1 [23.6 kB] 167s Get:186 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-nbconvert all 7.16.6-1 [140 kB] 168s Get:187 http://ftpmaster.internal/ubuntu resolute/main ppc64el sphinx-common all 8.2.3-12 [657 kB] 168s Get:188 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-alabaster all 0.7.16-0.1build1 [18.6 kB] 168s Get:189 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-snowballstemmer all 3.0.1-1 [65.9 kB] 168s Get:190 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-sphinx all 8.2.3-12 [483 kB] 168s Get:191 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-nbsphinx all 0.9.5+ds-1 [41.0 kB] 168s Get:192 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pluggy all 1.6.0-2 [21.1 kB] 168s Get:193 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-propcache ppc64el 0.3.1-1build1 [57.0 kB] 168s Get:194 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pydata-sphinx-theme all 0.16.1+dfsg-5 [944 kB] 168s Get:195 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pystac all 1.14.3-1 [150 kB] 168s Get:196 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pytest all 9.0.2-2 [277 kB] 168s Get:197 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pytest-mock all 3.15.1-1 [11.9 kB] 168s Get:198 http://ftpmaster.internal/ubuntu resolute/main ppc64el python3-wrapt ppc64el 1.17.3-3 [42.0 kB] 168s Get:199 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-yarl ppc64el 1.22.0-1 [106 kB] 168s Get:200 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-vcr all 7.0.0-2 [33.3 kB] 168s Get:201 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-pytest-recording all 0.13.4-1 [15.9 kB] 168s Get:202 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-rasterio ppc64el 1.4.3-2build2 [2056 kB] 168s Get:203 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-requests-mock all 1.12.1-4 [17.9 kB] 168s Get:204 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-shapely ppc64el 2.1.2-1ubuntu1 [450 kB] 168s Get:205 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-starlette all 0.50.0-1 [53.0 kB] 168s Get:206 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-uvloop ppc64el 0.22.1+ds1-2 [842 kB] 168s Get:207 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-wsproto all 1.3.2-1 [21.8 kB] 168s Get:208 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-uvicorn all 0.38.0-1 [45.9 kB] 168s Get:209 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-watchfiles ppc64el 1.1.1-2 [481 kB] 168s Get:210 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-websockets ppc64el 15.0.1-1build1 [98.7 kB] 168s Get:211 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-sphinx-autobuild all 2025.08.25-1 [12.0 kB] 168s Get:212 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-sphinx-design all 0.6.1-2 [894 kB] 168s Get:213 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjs-mathjax all 2.7.9+dfsg-1build1 [6017 kB] 169s Fetched 182 MB in 6s (30.6 MB/s) 169s Selecting previously unselected package python3.13-minimal. 169s (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 ... 121571 files and directories currently installed.) 169s Preparing to unpack .../000-python3.13-minimal_3.13.11-1_ppc64el.deb ... 169s Unpacking python3.13-minimal (3.13.11-1) ... 169s Selecting previously unselected package python3-numpy-dev:ppc64el. 169s Preparing to unpack .../001-python3-numpy-dev_1%3a2.3.5+ds-3_ppc64el.deb ... 169s Unpacking python3-numpy-dev:ppc64el (1:2.3.5+ds-3) ... 169s Selecting previously unselected package libblas3:ppc64el. 169s Preparing to unpack .../002-libblas3_3.12.1-7ubuntu1_ppc64el.deb ... 169s Unpacking libblas3:ppc64el (3.12.1-7ubuntu1) ... 169s Selecting previously unselected package libgfortran5:ppc64el. 169s Preparing to unpack .../003-libgfortran5_15.2.0-11ubuntu1_ppc64el.deb ... 169s Unpacking libgfortran5:ppc64el (15.2.0-11ubuntu1) ... 169s Selecting previously unselected package liblapack3:ppc64el. 169s Preparing to unpack .../004-liblapack3_3.12.1-7ubuntu1_ppc64el.deb ... 169s Unpacking liblapack3:ppc64el (3.12.1-7ubuntu1) ... 169s Selecting previously unselected package python3-numpy. 169s Preparing to unpack .../005-python3-numpy_1%3a2.3.5+ds-3_ppc64el.deb ... 169s Unpacking python3-numpy (1:2.3.5+ds-3) ... 169s Selecting previously unselected package python3.13. 169s Preparing to unpack .../006-python3.13_3.13.11-1_ppc64el.deb ... 169s Unpacking python3.13 (3.13.11-1) ... 169s Selecting previously unselected package m4. 169s Preparing to unpack .../007-m4_1.4.20-2_ppc64el.deb ... 169s Unpacking m4 (1.4.20-2) ... 169s Selecting previously unselected package autoconf. 169s Preparing to unpack .../008-autoconf_2.72-3.1ubuntu1_all.deb ... 169s Unpacking autoconf (2.72-3.1ubuntu1) ... 169s Selecting previously unselected package autotools-dev. 169s Preparing to unpack .../009-autotools-dev_20240727.1_all.deb ... 169s Unpacking autotools-dev (20240727.1) ... 169s Selecting previously unselected package automake. 169s Preparing to unpack .../010-automake_1%3a1.18.1-3build1_all.deb ... 169s Unpacking automake (1:1.18.1-3build1) ... 169s Selecting previously unselected package autopoint. 169s Preparing to unpack .../011-autopoint_0.23.2-1_all.deb ... 169s Unpacking autopoint (0.23.2-1) ... 169s Selecting previously unselected package libisl23:ppc64el. 169s Preparing to unpack .../012-libisl23_0.27-1build1_ppc64el.deb ... 169s Unpacking libisl23:ppc64el (0.27-1build1) ... 169s Selecting previously unselected package libmpc3:ppc64el. 169s Preparing to unpack .../013-libmpc3_1.3.1-2_ppc64el.deb ... 169s Unpacking libmpc3:ppc64el (1.3.1-2) ... 169s Selecting previously unselected package cpp-15-powerpc64le-linux-gnu. 169s Preparing to unpack .../014-cpp-15-powerpc64le-linux-gnu_15.2.0-11ubuntu1_ppc64el.deb ... 169s Unpacking cpp-15-powerpc64le-linux-gnu (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package cpp-15. 170s Preparing to unpack .../015-cpp-15_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking cpp-15 (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package cpp-powerpc64le-linux-gnu. 170s Preparing to unpack .../016-cpp-powerpc64le-linux-gnu_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 170s Unpacking cpp-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 170s Selecting previously unselected package cpp. 170s Preparing to unpack .../017-cpp_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 170s Unpacking cpp (4:15.2.0-4ubuntu1) ... 170s Selecting previously unselected package libcc1-0:ppc64el. 170s Preparing to unpack .../018-libcc1-0_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking libcc1-0:ppc64el (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package libgomp1:ppc64el. 170s Preparing to unpack .../019-libgomp1_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking libgomp1:ppc64el (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package libitm1:ppc64el. 170s Preparing to unpack .../020-libitm1_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking libitm1:ppc64el (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package libasan8:ppc64el. 170s Preparing to unpack .../021-libasan8_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking libasan8:ppc64el (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package liblsan0:ppc64el. 170s Preparing to unpack .../022-liblsan0_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking liblsan0:ppc64el (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package libtsan2:ppc64el. 170s Preparing to unpack .../023-libtsan2_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking libtsan2:ppc64el (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package libubsan1:ppc64el. 170s Preparing to unpack .../024-libubsan1_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking libubsan1:ppc64el (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package libquadmath0:ppc64el. 170s Preparing to unpack .../025-libquadmath0_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking libquadmath0:ppc64el (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package libgcc-15-dev:ppc64el. 170s Preparing to unpack .../026-libgcc-15-dev_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking libgcc-15-dev:ppc64el (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package gcc-15-powerpc64le-linux-gnu. 170s Preparing to unpack .../027-gcc-15-powerpc64le-linux-gnu_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking gcc-15-powerpc64le-linux-gnu (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package gcc-15. 170s Preparing to unpack .../028-gcc-15_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking gcc-15 (15.2.0-11ubuntu1) ... 170s Selecting previously unselected package gcc-powerpc64le-linux-gnu. 170s Preparing to unpack .../029-gcc-powerpc64le-linux-gnu_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 170s Unpacking gcc-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 170s Selecting previously unselected package gcc. 170s Preparing to unpack .../030-gcc_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 170s Unpacking gcc (4:15.2.0-4ubuntu1) ... 170s Selecting previously unselected package libstdc++-15-dev:ppc64el. 170s Preparing to unpack .../031-libstdc++-15-dev_15.2.0-11ubuntu1_ppc64el.deb ... 170s Unpacking libstdc++-15-dev:ppc64el (15.2.0-11ubuntu1) ... 171s Selecting previously unselected package g++-15-powerpc64le-linux-gnu. 171s Preparing to unpack .../032-g++-15-powerpc64le-linux-gnu_15.2.0-11ubuntu1_ppc64el.deb ... 171s Unpacking g++-15-powerpc64le-linux-gnu (15.2.0-11ubuntu1) ... 171s Selecting previously unselected package g++-15. 171s Preparing to unpack .../033-g++-15_15.2.0-11ubuntu1_ppc64el.deb ... 171s Unpacking g++-15 (15.2.0-11ubuntu1) ... 171s Selecting previously unselected package g++-powerpc64le-linux-gnu. 171s Preparing to unpack .../034-g++-powerpc64le-linux-gnu_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 171s Unpacking g++-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 171s Selecting previously unselected package g++. 171s Preparing to unpack .../035-g++_4%3a15.2.0-4ubuntu1_ppc64el.deb ... 171s Unpacking g++ (4:15.2.0-4ubuntu1) ... 171s Selecting previously unselected package build-essential. 171s Preparing to unpack .../036-build-essential_12.12ubuntu2_ppc64el.deb ... 171s Unpacking build-essential (12.12ubuntu2) ... 171s Selecting previously unselected package libdebhelper-perl. 171s Preparing to unpack .../037-libdebhelper-perl_13.28ubuntu1_all.deb ... 171s Unpacking libdebhelper-perl (13.28ubuntu1) ... 171s Selecting previously unselected package libtool. 171s Preparing to unpack .../038-libtool_2.5.4-9_all.deb ... 171s Unpacking libtool (2.5.4-9) ... 171s Selecting previously unselected package dh-autoreconf. 171s Preparing to unpack .../039-dh-autoreconf_21_all.deb ... 171s Unpacking dh-autoreconf (21) ... 171s Selecting previously unselected package libarchive-zip-perl. 171s Preparing to unpack .../040-libarchive-zip-perl_1.68-1_all.deb ... 171s Unpacking libarchive-zip-perl (1.68-1) ... 171s Selecting previously unselected package libfile-stripnondeterminism-perl. 171s Preparing to unpack .../041-libfile-stripnondeterminism-perl_1.15.0-1build1_all.deb ... 171s Unpacking libfile-stripnondeterminism-perl (1.15.0-1build1) ... 171s Selecting previously unselected package dh-strip-nondeterminism. 171s Preparing to unpack .../042-dh-strip-nondeterminism_1.15.0-1build1_all.deb ... 171s Unpacking dh-strip-nondeterminism (1.15.0-1build1) ... 171s Selecting previously unselected package debugedit. 171s Preparing to unpack .../043-debugedit_1%3a5.2-3_ppc64el.deb ... 171s Unpacking debugedit (1:5.2-3) ... 171s Selecting previously unselected package dwz. 171s Preparing to unpack .../044-dwz_0.16-2_ppc64el.deb ... 171s Unpacking dwz (0.16-2) ... 171s Selecting previously unselected package gettext. 171s Preparing to unpack .../045-gettext_0.23.2-1_ppc64el.deb ... 171s Unpacking gettext (0.23.2-1) ... 171s Selecting previously unselected package intltool-debian. 171s Preparing to unpack .../046-intltool-debian_0.35.0+20060710.6build1_all.deb ... 171s Unpacking intltool-debian (0.35.0+20060710.6build1) ... 171s Selecting previously unselected package po-debconf. 171s Preparing to unpack .../047-po-debconf_1.0.22_all.deb ... 171s Unpacking po-debconf (1.0.22) ... 171s Selecting previously unselected package debhelper. 171s Preparing to unpack .../048-debhelper_13.28ubuntu1_all.deb ... 171s Unpacking debhelper (13.28ubuntu1) ... 171s Selecting previously unselected package dh-python. 171s Preparing to unpack .../049-dh-python_7.20251231_all.deb ... 171s Unpacking dh-python (7.20251231) ... 171s Selecting previously unselected package sgml-base. 171s Preparing to unpack .../050-sgml-base_1.31+nmu1_all.deb ... 171s Unpacking sgml-base (1.31+nmu1) ... 171s Selecting previously unselected package xml-core. 171s Preparing to unpack .../051-xml-core_0.19build1_all.deb ... 171s Unpacking xml-core (0.19build1) ... 171s Selecting previously unselected package docutils-common. 171s Preparing to unpack .../052-docutils-common_0.22.4+dfsg-1_all.deb ... 171s Unpacking docutils-common (0.22.4+dfsg-1) ... 171s Selecting previously unselected package fonts-dejavu-mono. 172s Preparing to unpack .../053-fonts-dejavu-mono_2.37-8build1_all.deb ... 172s Unpacking fonts-dejavu-mono (2.37-8build1) ... 172s Selecting previously unselected package fonts-dejavu-core. 172s Preparing to unpack .../054-fonts-dejavu-core_2.37-8build1_all.deb ... 172s Unpacking fonts-dejavu-core (2.37-8build1) ... 172s Selecting previously unselected package fontconfig-config. 172s Preparing to unpack .../055-fontconfig-config_2.15.0-2.4ubuntu1_ppc64el.deb ... 172s Unpacking fontconfig-config (2.15.0-2.4ubuntu1) ... 172s Selecting previously unselected package fonts-mathjax. 172s Preparing to unpack .../056-fonts-mathjax_2.7.9+dfsg-1build1_all.deb ... 172s Unpacking fonts-mathjax (2.7.9+dfsg-1build1) ... 172s Selecting previously unselected package gdal-data. 172s Preparing to unpack .../057-gdal-data_3.12.1+dfsg-1_all.deb ... 172s Unpacking gdal-data (3.12.1+dfsg-1) ... 172s Selecting previously unselected package gdal-plugins:ppc64el. 172s Preparing to unpack .../058-gdal-plugins_3.12.1+dfsg-1_ppc64el.deb ... 172s Unpacking gdal-plugins:ppc64el (3.12.1+dfsg-1) ... 172s Selecting previously unselected package libabsl20240722:ppc64el. 172s Preparing to unpack .../059-libabsl20240722_20240722.0-4ubuntu1_ppc64el.deb ... 172s Unpacking libabsl20240722:ppc64el (20240722.0-4ubuntu1) ... 172s Selecting previously unselected package libaec0:ppc64el. 172s Preparing to unpack .../060-libaec0_1.1.4-2_ppc64el.deb ... 172s Unpacking libaec0:ppc64el (1.1.4-2) ... 172s Selecting previously unselected package libaom3:ppc64el. 172s Preparing to unpack .../061-libaom3_3.13.1-2_ppc64el.deb ... 172s Unpacking libaom3:ppc64el (3.13.1-2) ... 172s Selecting previously unselected package libarpack2t64:ppc64el. 172s Preparing to unpack .../062-libarpack2t64_3.9.1-6_ppc64el.deb ... 172s Unpacking libarpack2t64:ppc64el (3.9.1-6) ... 172s Selecting previously unselected package libarmadillo14. 172s Preparing to unpack .../063-libarmadillo14_1%3a14.2.3+dfsg-1_ppc64el.deb ... 172s Unpacking libarmadillo14 (1:14.2.3+dfsg-1) ... 172s Selecting previously unselected package libdav1d7:ppc64el. 172s Preparing to unpack .../064-libdav1d7_1.5.3-1_ppc64el.deb ... 172s Unpacking libdav1d7:ppc64el (1.5.3-1) ... 172s Selecting previously unselected package libgav1-2:ppc64el. 172s Preparing to unpack .../065-libgav1-2_0.20.0-2_ppc64el.deb ... 172s Unpacking libgav1-2:ppc64el (0.20.0-2) ... 172s Selecting previously unselected package libjpeg-turbo8:ppc64el. 172s Preparing to unpack .../066-libjpeg-turbo8_2.1.5-4ubuntu2_ppc64el.deb ... 172s Unpacking libjpeg-turbo8:ppc64el (2.1.5-4ubuntu2) ... 172s Selecting previously unselected package libjpeg8:ppc64el. 172s Preparing to unpack .../067-libjpeg8_8c-2ubuntu11_ppc64el.deb ... 172s Unpacking libjpeg8:ppc64el (8c-2ubuntu11) ... 172s Selecting previously unselected package libyuv0:ppc64el. 172s Preparing to unpack .../068-libyuv0_0.0.1922.20260106-1_ppc64el.deb ... 172s Unpacking libyuv0:ppc64el (0.0.1922.20260106-1) ... 172s Selecting previously unselected package libavif16:ppc64el. 172s Preparing to unpack .../069-libavif16_1.3.0-1ubuntu3_ppc64el.deb ... 172s Unpacking libavif16:ppc64el (1.3.0-1ubuntu3) ... 172s Selecting previously unselected package libsnappy1v5:ppc64el. 172s Preparing to unpack .../070-libsnappy1v5_1.2.2-2_ppc64el.deb ... 172s Unpacking libsnappy1v5:ppc64el (1.2.2-2) ... 172s Selecting previously unselected package libblosc1:ppc64el. 172s Preparing to unpack .../071-libblosc1_1.21.5+ds-2_ppc64el.deb ... 172s Unpacking libblosc1:ppc64el (1.21.5+ds-2) ... 172s Selecting previously unselected package libcfitsio10t64:ppc64el. 172s Preparing to unpack .../072-libcfitsio10t64_4.6.3-1_ppc64el.deb ... 172s Unpacking libcfitsio10t64:ppc64el (4.6.3-1) ... 172s Selecting previously unselected package libde265-0:ppc64el. 172s Preparing to unpack .../073-libde265-0_1.0.16-1build1_ppc64el.deb ... 172s Unpacking libde265-0:ppc64el (1.0.16-1build1) ... 172s Selecting previously unselected package libdeflate0:ppc64el. 172s Preparing to unpack .../074-libdeflate0_1.23-2_ppc64el.deb ... 172s Unpacking libdeflate0:ppc64el (1.23-2) ... 172s Selecting previously unselected package libfontconfig1:ppc64el. 172s Preparing to unpack .../075-libfontconfig1_2.15.0-2.4ubuntu1_ppc64el.deb ... 172s Unpacking libfontconfig1:ppc64el (2.15.0-2.4ubuntu1) ... 172s Selecting previously unselected package libfyba0t64:ppc64el. 172s Preparing to unpack .../076-libfyba0t64_4.1.1-11build2_ppc64el.deb ... 172s Unpacking libfyba0t64:ppc64el (4.1.1-11build2) ... 172s Selecting previously unselected package libminizip1t64:ppc64el. 172s Preparing to unpack .../077-libminizip1t64_1%3a1.3.dfsg+really1.3.1-1ubuntu2_ppc64el.deb ... 172s Unpacking libminizip1t64:ppc64el (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 172s Selecting previously unselected package libfreexl1:ppc64el. 172s Preparing to unpack .../078-libfreexl1_2.0.0-1build3_ppc64el.deb ... 172s Unpacking libfreexl1:ppc64el (2.0.0-1build3) ... 172s Selecting previously unselected package libgeos3.14.1:ppc64el. 172s Preparing to unpack .../079-libgeos3.14.1_3.14.1-2_ppc64el.deb ... 172s Unpacking libgeos3.14.1:ppc64el (3.14.1-2) ... 172s Selecting previously unselected package libgeos-c1t64:ppc64el. 172s Preparing to unpack .../080-libgeos-c1t64_3.14.1-2_ppc64el.deb ... 172s Unpacking libgeos-c1t64:ppc64el (3.14.1-2) ... 172s Selecting previously unselected package proj-data. 172s Preparing to unpack .../081-proj-data_9.7.1-1_all.deb ... 172s Unpacking proj-data (9.7.1-1) ... 172s Selecting previously unselected package libjbig0:ppc64el. 172s Preparing to unpack .../082-libjbig0_2.1-6.1ubuntu3_ppc64el.deb ... 172s Unpacking libjbig0:ppc64el (2.1-6.1ubuntu3) ... 172s Selecting previously unselected package liblerc4:ppc64el. 172s Preparing to unpack .../083-liblerc4_4.0.0+ds-5ubuntu2_ppc64el.deb ... 172s Unpacking liblerc4:ppc64el (4.0.0+ds-5ubuntu2) ... 172s Selecting previously unselected package libsharpyuv0:ppc64el. 173s Preparing to unpack .../084-libsharpyuv0_1.5.0-0.1build1_ppc64el.deb ... 173s Unpacking libsharpyuv0:ppc64el (1.5.0-0.1build1) ... 173s Selecting previously unselected package libwebp7:ppc64el. 173s Preparing to unpack .../085-libwebp7_1.5.0-0.1build1_ppc64el.deb ... 173s Unpacking libwebp7:ppc64el (1.5.0-0.1build1) ... 173s Selecting previously unselected package libtiff6:ppc64el. 173s Preparing to unpack .../086-libtiff6_4.7.0-3ubuntu3_ppc64el.deb ... 173s Unpacking libtiff6:ppc64el (4.7.0-3ubuntu3) ... 173s Selecting previously unselected package libproj25:ppc64el. 173s Preparing to unpack .../087-libproj25_9.7.1-1_ppc64el.deb ... 173s Unpacking libproj25:ppc64el (9.7.1-1) ... 173s Selecting previously unselected package libgeotiff5:ppc64el. 173s Preparing to unpack .../088-libgeotiff5_1.7.4-1_ppc64el.deb ... 173s Unpacking libgeotiff5:ppc64el (1.7.4-1) ... 173s Selecting previously unselected package libgif7:ppc64el. 173s Preparing to unpack .../089-libgif7_5.2.2-1ubuntu3_ppc64el.deb ... 173s Unpacking libgif7:ppc64el (5.2.2-1ubuntu3) ... 173s Selecting previously unselected package libsz2:ppc64el. 173s Preparing to unpack .../090-libsz2_1.1.4-2_ppc64el.deb ... 173s Unpacking libsz2:ppc64el (1.1.4-2) ... 173s Selecting previously unselected package libhdf4-0-alt:ppc64el. 173s Preparing to unpack .../091-libhdf4-0-alt_4.3.0-1_ppc64el.deb ... 173s Unpacking libhdf4-0-alt:ppc64el (4.3.0-1) ... 173s Selecting previously unselected package libhdf5-310:ppc64el. 173s Preparing to unpack .../092-libhdf5-310_1.14.5+repack-4_ppc64el.deb ... 173s Unpacking libhdf5-310:ppc64el (1.14.5+repack-4) ... 173s Selecting previously unselected package libheif-plugin-aomdec:ppc64el. 173s Preparing to unpack .../093-libheif-plugin-aomdec_1.21.2-1_ppc64el.deb ... 173s Unpacking libheif-plugin-aomdec:ppc64el (1.21.2-1) ... 173s Selecting previously unselected package libheif-plugin-libde265:ppc64el. 173s Preparing to unpack .../094-libheif-plugin-libde265_1.21.2-1_ppc64el.deb ... 173s Unpacking libheif-plugin-libde265:ppc64el (1.21.2-1) ... 173s Selecting previously unselected package libheif1:ppc64el. 173s Preparing to unpack .../095-libheif1_1.21.2-1_ppc64el.deb ... 173s Unpacking libheif1:ppc64el (1.21.2-1) ... 173s Selecting previously unselected package liburiparser1:ppc64el. 173s Preparing to unpack .../096-liburiparser1_0.9.8+dfsg-2_ppc64el.deb ... 173s Unpacking liburiparser1:ppc64el (0.9.8+dfsg-2) ... 173s Selecting previously unselected package libkmlbase1t64:ppc64el. 173s Preparing to unpack .../097-libkmlbase1t64_1.3.0-13_ppc64el.deb ... 173s Unpacking libkmlbase1t64:ppc64el (1.3.0-13) ... 173s Selecting previously unselected package libkmldom1t64:ppc64el. 173s Preparing to unpack .../098-libkmldom1t64_1.3.0-13_ppc64el.deb ... 173s Unpacking libkmldom1t64:ppc64el (1.3.0-13) ... 173s Selecting previously unselected package libkmlengine1t64:ppc64el. 173s Preparing to unpack .../099-libkmlengine1t64_1.3.0-13_ppc64el.deb ... 173s Unpacking libkmlengine1t64:ppc64el (1.3.0-13) ... 173s Selecting previously unselected package mysql-common. 173s Preparing to unpack .../100-mysql-common_5.8+1.1.1ubuntu2_all.deb ... 173s Unpacking mysql-common (5.8+1.1.1ubuntu2) ... 173s Selecting previously unselected package libmysqlclient24:ppc64el. 173s Preparing to unpack .../101-libmysqlclient24_8.4.7-0ubuntu3_ppc64el.deb ... 173s Unpacking libmysqlclient24:ppc64el (8.4.7-0ubuntu3) ... 173s Selecting previously unselected package libhdf5-hl-310:ppc64el. 173s Preparing to unpack .../102-libhdf5-hl-310_1.14.5+repack-4_ppc64el.deb ... 173s Unpacking libhdf5-hl-310:ppc64el (1.14.5+repack-4) ... 173s Selecting previously unselected package libnetcdf22:ppc64el. 173s Preparing to unpack .../103-libnetcdf22_1%3a4.9.3-1build1_ppc64el.deb ... 173s Unpacking libnetcdf22:ppc64el (1:4.9.3-1build1) ... 173s Selecting previously unselected package libltdl7:ppc64el. 173s Preparing to unpack .../104-libltdl7_2.5.4-9_ppc64el.deb ... 173s Unpacking libltdl7:ppc64el (2.5.4-9) ... 173s Selecting previously unselected package libodbc2:ppc64el. 173s Preparing to unpack .../105-libodbc2_2.3.14-1_ppc64el.deb ... 173s Unpacking libodbc2:ppc64el (2.3.14-1) ... 173s Selecting previously unselected package unixodbc-common. 173s Preparing to unpack .../106-unixodbc-common_2.3.14-1_all.deb ... 173s Unpacking unixodbc-common (2.3.14-1) ... 173s Selecting previously unselected package libodbcinst2:ppc64el. 173s Preparing to unpack .../107-libodbcinst2_2.3.14-1_ppc64el.deb ... 173s Unpacking libodbcinst2:ppc64el (2.3.14-1) ... 173s Selecting previously unselected package libogdi4.1:ppc64el. 173s Preparing to unpack .../108-libogdi4.1_4.1.1+ds-5_ppc64el.deb ... 173s Unpacking libogdi4.1:ppc64el (4.1.1+ds-5) ... 173s Selecting previously unselected package libopenjp2-7:ppc64el. 173s Preparing to unpack .../109-libopenjp2-7_2.5.4-1_ppc64el.deb ... 173s Unpacking libopenjp2-7:ppc64el (2.5.4-1) ... 173s Selecting previously unselected package libgpgmepp6t64:ppc64el. 173s Preparing to unpack .../110-libgpgmepp6t64_1.24.2-3ubuntu2_ppc64el.deb ... 173s Unpacking libgpgmepp6t64:ppc64el (1.24.2-3ubuntu2) ... 173s Selecting previously unselected package liblcms2-2:ppc64el. 173s Preparing to unpack .../111-liblcms2-2_2.17-1_ppc64el.deb ... 173s Unpacking liblcms2-2:ppc64el (2.17-1) ... 173s Selecting previously unselected package libpoppler147:ppc64el. 173s Preparing to unpack .../112-libpoppler147_25.03.0-11.1_ppc64el.deb ... 173s Unpacking libpoppler147:ppc64el (25.03.0-11.1) ... 173s Selecting previously unselected package libpq5:ppc64el. 173s Preparing to unpack .../113-libpq5_18.1-2_ppc64el.deb ... 173s Unpacking libpq5:ppc64el (18.1-2) ... 173s Selecting previously unselected package libqhull-r8.0:ppc64el. 173s Preparing to unpack .../114-libqhull-r8.0_2020.2-8_ppc64el.deb ... 173s Unpacking libqhull-r8.0:ppc64el (2020.2-8) ... 173s Selecting previously unselected package librttopo1:ppc64el. 173s Preparing to unpack .../115-librttopo1_1.1.0-4_ppc64el.deb ... 173s Unpacking librttopo1:ppc64el (1.1.0-4) ... 173s Selecting previously unselected package libspatialite8t64:ppc64el. 173s Preparing to unpack .../116-libspatialite8t64_5.1.0-3ubuntu1_ppc64el.deb ... 173s Unpacking libspatialite8t64:ppc64el (5.1.0-3ubuntu1) ... 173s Selecting previously unselected package libxerces-c3.2t64:ppc64el. 173s Preparing to unpack .../117-libxerces-c3.2t64_3.2.4+debian-1.3build2_ppc64el.deb ... 173s Unpacking libxerces-c3.2t64:ppc64el (3.2.4+debian-1.3build2) ... 173s Selecting previously unselected package libgdal36:ppc64el. 173s Preparing to unpack .../118-libgdal36_3.10.3+dfsg-1build3_ppc64el.deb ... 173s Unpacking libgdal36:ppc64el (3.10.3+dfsg-1build3) ... 174s Selecting previously unselected package libjson-perl. 174s Preparing to unpack .../119-libjson-perl_4.10000-1_all.deb ... 174s Unpacking libjson-perl (4.10000-1) ... 174s Selecting previously unselected package liblua5.4-0:ppc64el. 174s Preparing to unpack .../120-liblua5.4-0_5.4.8-1_ppc64el.deb ... 174s Unpacking liblua5.4-0:ppc64el (5.4.8-1) ... 174s Selecting previously unselected package libnorm1t64:ppc64el. 174s Preparing to unpack .../121-libnorm1t64_1.5.9+dfsg-4_ppc64el.deb ... 174s Unpacking libnorm1t64:ppc64el (1.5.9+dfsg-4) ... 174s Selecting previously unselected package libpgm-5.3-0t64:ppc64el. 174s Preparing to unpack .../122-libpgm-5.3-0t64_5.3.128~dfsg-2.1build2_ppc64el.deb ... 174s Unpacking libpgm-5.3-0t64:ppc64el (5.3.128~dfsg-2.1build2) ... 174s Selecting previously unselected package libsodium23:ppc64el. 174s Preparing to unpack .../123-libsodium23_1.0.18-2_ppc64el.deb ... 174s Unpacking libsodium23:ppc64el (1.0.18-2) ... 174s Selecting previously unselected package libzmq5:ppc64el. 174s Preparing to unpack .../124-libzmq5_4.3.5-1build3_ppc64el.deb ... 174s Unpacking libzmq5:ppc64el (4.3.5-1build3) ... 174s Selecting previously unselected package node-fortawesome-fontawesome-free. 174s Preparing to unpack .../125-node-fortawesome-fontawesome-free_6.7.2+ds1-1_all.deb ... 174s Unpacking node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 174s Selecting previously unselected package pandoc-data. 174s Preparing to unpack .../126-pandoc-data_3.1.11.1-3build1_all.deb ... 174s Unpacking pandoc-data (3.1.11.1-3build1) ... 174s Selecting previously unselected package pandoc. 174s Preparing to unpack .../127-pandoc_3.1.11.1+ds-4_ppc64el.deb ... 174s Unpacking pandoc (3.1.11.1+ds-4) ... 175s Selecting previously unselected package pybuild-plugin-autopkgtest. 175s Preparing to unpack .../128-pybuild-plugin-autopkgtest_7.20251231_all.deb ... 175s Unpacking pybuild-plugin-autopkgtest (7.20251231) ... 175s Selecting previously unselected package python3-pyproject-hooks. 175s Preparing to unpack .../129-python3-pyproject-hooks_1.2.0-1_all.deb ... 175s Unpacking python3-pyproject-hooks (1.2.0-1) ... 175s Selecting previously unselected package python3-wheel. 175s Preparing to unpack .../130-python3-wheel_0.46.1-2_all.deb ... 175s Unpacking python3-wheel (0.46.1-2) ... 176s Selecting previously unselected package python3-build. 176s Preparing to unpack .../131-python3-build_1.2.2-5_all.deb ... 176s Unpacking python3-build (1.2.2-5) ... 176s Selecting previously unselected package python3-installer. 176s Preparing to unpack .../132-python3-installer_0.7.0+dfsg1-3_all.deb ... 176s Unpacking python3-installer (0.7.0+dfsg1-3) ... 176s Selecting previously unselected package pybuild-plugin-pyproject. 176s Preparing to unpack .../133-pybuild-plugin-pyproject_7.20251231_all.deb ... 176s Unpacking pybuild-plugin-pyproject (7.20251231) ... 176s Selecting previously unselected package python-pystac-doc. 176s Preparing to unpack .../134-python-pystac-doc_1.14.3-1_all.deb ... 176s Unpacking python-pystac-doc (1.14.3-1) ... 176s Selecting previously unselected package python-tinycss2-common. 176s Preparing to unpack .../135-python-tinycss2-common_1.5.1-1_all.deb ... 176s Unpacking python-tinycss2-common (1.5.1-1) ... 176s Selecting previously unselected package python3-accessible-pygments. 176s Preparing to unpack .../136-python3-accessible-pygments_0.0.5-2build1_all.deb ... 176s Unpacking python3-accessible-pygments (0.0.5-2build1) ... 176s Selecting previously unselected package python3-affine. 176s Preparing to unpack .../137-python3-affine_2.4.0-2_all.deb ... 176s Unpacking python3-affine (2.4.0-2) ... 176s Selecting previously unselected package python3-all. 176s Preparing to unpack .../138-python3-all_3.14.2-1_ppc64el.deb ... 176s Unpacking python3-all (3.14.2-1) ... 176s Selecting previously unselected package python3-sniffio. 176s Preparing to unpack .../139-python3-sniffio_1.3.1-1_all.deb ... 176s Unpacking python3-sniffio (1.3.1-1) ... 176s Selecting previously unselected package python3-anyio. 176s Preparing to unpack .../140-python3-anyio_4.11.0-3_all.deb ... 176s Unpacking python3-anyio (4.11.0-3) ... 176s Selecting previously unselected package python3-astroid. 176s Preparing to unpack .../141-python3-astroid_4.0.2-1ubuntu1_all.deb ... 176s Unpacking python3-astroid (4.0.2-1ubuntu1) ... 176s Selecting previously unselected package python3-asttokens. 176s Preparing to unpack .../142-python3-asttokens_3.0.1-1_all.deb ... 176s Unpacking python3-asttokens (3.0.1-1) ... 176s Selecting previously unselected package python3-webencodings. 176s Preparing to unpack .../143-python3-webencodings_0.5.1-5build1_all.deb ... 176s Unpacking python3-webencodings (0.5.1-5build1) ... 176s Selecting previously unselected package python3-html5lib. 176s Preparing to unpack .../144-python3-html5lib_1.2-3_all.deb ... 176s Unpacking python3-html5lib (1.2-3) ... 176s Selecting previously unselected package python3-bleach. 176s Preparing to unpack .../145-python3-bleach_6.3.0-1_all.deb ... 176s Unpacking python3-bleach (6.3.0-1) ... 176s Selecting previously unselected package python3-soupsieve. 176s Preparing to unpack .../146-python3-soupsieve_2.8.1-1_all.deb ... 176s Unpacking python3-soupsieve (2.8.1-1) ... 176s Selecting previously unselected package python3-bs4. 176s Preparing to unpack .../147-python3-bs4_4.14.3-2build1_all.deb ... 176s Unpacking python3-bs4 (4.14.3-2build1) ... 176s Selecting previously unselected package python3-click. 176s Preparing to unpack .../148-python3-click_8.2.0+0.really.8.1.8-1build1_all.deb ... 176s Unpacking python3-click (8.2.0+0.really.8.1.8-1build1) ... 176s Selecting previously unselected package python3-click-plugins. 176s Preparing to unpack .../149-python3-click-plugins_1.1.1-5_all.deb ... 176s Unpacking python3-click-plugins (1.1.1-5) ... 176s Selecting previously unselected package python3-cligj. 176s Preparing to unpack .../150-python3-cligj_0.7.2-3_all.deb ... 176s Unpacking python3-cligj (0.7.2-3) ... 176s Selecting previously unselected package python3-colorama. 176s Preparing to unpack .../151-python3-colorama_0.4.6-4build1_all.deb ... 176s Unpacking python3-colorama (0.4.6-4build1) ... 176s Selecting previously unselected package python3-decorator. 176s Preparing to unpack .../152-python3-decorator_5.2.1-2_all.deb ... 176s Unpacking python3-decorator (5.2.1-2) ... 176s Selecting previously unselected package python3-defusedxml. 176s Preparing to unpack .../153-python3-defusedxml_0.7.1-3build1_all.deb ... 176s Unpacking python3-defusedxml (0.7.1-3build1) ... 176s Selecting previously unselected package python3-roman-numerals. 176s Preparing to unpack .../154-python3-roman-numerals_4.1.0-1_all.deb ... 176s Unpacking python3-roman-numerals (4.1.0-1) ... 176s Selecting previously unselected package python3-docutils. 176s Preparing to unpack .../155-python3-docutils_0.22.4+dfsg-1_all.deb ... 176s Unpacking python3-docutils (0.22.4+dfsg-1) ... 176s Selecting previously unselected package python3-executing. 176s Preparing to unpack .../156-python3-executing_2.2.1-0.1_all.deb ... 176s Unpacking python3-executing (2.2.1-0.1) ... 176s Selecting previously unselected package python3-fastjsonschema. 176s Preparing to unpack .../157-python3-fastjsonschema_2.21.1-1_all.deb ... 176s Unpacking python3-fastjsonschema (2.21.1-1) ... 176s Selecting previously unselected package python3-h11. 176s Preparing to unpack .../158-python3-h11_0.14.0-1.1_all.deb ... 176s Unpacking python3-h11 (0.14.0-1.1) ... 176s Selecting previously unselected package python3-imagesize. 176s Preparing to unpack .../159-python3-imagesize_1.4.1-1build1_all.deb ... 176s Unpacking python3-imagesize (1.4.1-1build1) ... 176s Selecting previously unselected package python3-iniconfig. 176s Preparing to unpack .../160-python3-iniconfig_2.1.0-2_all.deb ... 176s Unpacking python3-iniconfig (2.1.0-2) ... 176s Selecting previously unselected package python3-parso. 176s Preparing to unpack .../161-python3-parso_0.8.5-1_all.deb ... 176s Unpacking python3-parso (0.8.5-1) ... 176s Selecting previously unselected package python3-typeshed. 176s Preparing to unpack .../162-python3-typeshed_0.0~git20241223.ea91db2-4_all.deb ... 176s Unpacking python3-typeshed (0.0~git20241223.ea91db2-4) ... 177s Selecting previously unselected package python3-jedi. 177s Preparing to unpack .../163-python3-jedi_0.19.1+ds1-1build1_all.deb ... 177s Unpacking python3-jedi (0.19.1+ds1-1build1) ... 177s Selecting previously unselected package python3-traitlets. 177s Preparing to unpack .../164-python3-traitlets_5.14.3+really5.14.3-2_all.deb ... 177s Unpacking python3-traitlets (5.14.3+really5.14.3-2) ... 177s Selecting previously unselected package python3-matplotlib-inline. 177s Preparing to unpack .../165-python3-matplotlib-inline_0.2.1-1_all.deb ... 177s Unpacking python3-matplotlib-inline (0.2.1-1) ... 177s Selecting previously unselected package python3-wcwidth. 177s Preparing to unpack .../166-python3-wcwidth_0.2.14+dfsg1-1build1_all.deb ... 177s Unpacking python3-wcwidth (0.2.14+dfsg1-1build1) ... 177s Selecting previously unselected package python3-prompt-toolkit. 177s Preparing to unpack .../167-python3-prompt-toolkit_3.0.52-2_all.deb ... 177s Unpacking python3-prompt-toolkit (3.0.52-2) ... 177s Selecting previously unselected package python3-pure-eval. 177s Preparing to unpack .../168-python3-pure-eval_0.2.3-1_all.deb ... 177s Unpacking python3-pure-eval (0.2.3-1) ... 177s Selecting previously unselected package python3-stack-data. 177s Preparing to unpack .../169-python3-stack-data_0.6.3-3_all.deb ... 177s Unpacking python3-stack-data (0.6.3-3) ... 177s Selecting previously unselected package python3-ipython. 177s Preparing to unpack .../170-python3-ipython_8.35.0-2_all.deb ... 177s Unpacking python3-ipython (8.35.0-2) ... 177s Selecting previously unselected package python3-platformdirs. 177s Preparing to unpack .../171-python3-platformdirs_4.5.1-1_all.deb ... 177s Unpacking python3-platformdirs (4.5.1-1) ... 177s Selecting previously unselected package python3-jupyter-core. 177s Preparing to unpack .../172-python3-jupyter-core_5.9.1-1_all.deb ... 177s Unpacking python3-jupyter-core (5.9.1-1) ... 177s Selecting previously unselected package python3-psutil. 177s Preparing to unpack .../173-python3-psutil_7.1.0-1ubuntu1_ppc64el.deb ... 177s Unpacking python3-psutil (7.1.0-1ubuntu1) ... 177s Selecting previously unselected package python3-tornado. 177s Preparing to unpack .../174-python3-tornado_6.5.4-0.1_ppc64el.deb ... 177s Unpacking python3-tornado (6.5.4-0.1) ... 177s Selecting previously unselected package python3-zmq. 177s Preparing to unpack .../175-python3-zmq_27.1.0-1_ppc64el.deb ... 177s Unpacking python3-zmq (27.1.0-1) ... 177s Selecting previously unselected package python3-jupyter-client. 177s Preparing to unpack .../176-python3-jupyter-client_8.7.0-1_all.deb ... 177s Unpacking python3-jupyter-client (8.7.0-1) ... 177s Selecting previously unselected package python3-jupyterlab-pygments. 177s Preparing to unpack .../177-python3-jupyterlab-pygments_0.2.2-3build1_all.deb ... 177s Unpacking python3-jupyterlab-pygments (0.2.2-3build1) ... 177s Selecting previously unselected package python3-livereload. 177s Preparing to unpack .../178-python3-livereload_2.7.1-0.1_all.deb ... 177s Unpacking python3-livereload (2.7.1-0.1) ... 177s Selecting previously unselected package python3-mistune. 177s Preparing to unpack .../179-python3-mistune_3.1.4-1_all.deb ... 177s Unpacking python3-mistune (3.1.4-1) ... 177s Selecting previously unselected package python3-multidict. 177s Preparing to unpack .../180-python3-multidict_6.4.3-1build1_ppc64el.deb ... 177s Unpacking python3-multidict (6.4.3-1build1) ... 177s Selecting previously unselected package python3-nbformat. 177s Preparing to unpack .../181-python3-nbformat_5.10.4-1_all.deb ... 177s Unpacking python3-nbformat (5.10.4-1) ... 178s Selecting previously unselected package python3-nbclient. 178s Preparing to unpack .../182-python3-nbclient_0.10.4-1_all.deb ... 178s Unpacking python3-nbclient (0.10.4-1) ... 178s Selecting previously unselected package python3-tinycss2. 178s Preparing to unpack .../183-python3-tinycss2_1.5.1-1_all.deb ... 178s Unpacking python3-tinycss2 (1.5.1-1) ... 178s Selecting previously unselected package python3-pandocfilters. 178s Preparing to unpack .../184-python3-pandocfilters_1.5.1-1_all.deb ... 178s Unpacking python3-pandocfilters (1.5.1-1) ... 178s Selecting previously unselected package python3-nbconvert. 178s Preparing to unpack .../185-python3-nbconvert_7.16.6-1_all.deb ... 178s Unpacking python3-nbconvert (7.16.6-1) ... 178s Selecting previously unselected package sphinx-common. 178s Preparing to unpack .../186-sphinx-common_8.2.3-12_all.deb ... 178s Unpacking sphinx-common (8.2.3-12) ... 178s Selecting previously unselected package python3-alabaster. 178s Preparing to unpack .../187-python3-alabaster_0.7.16-0.1build1_all.deb ... 178s Unpacking python3-alabaster (0.7.16-0.1build1) ... 178s Selecting previously unselected package python3-snowballstemmer. 178s Preparing to unpack .../188-python3-snowballstemmer_3.0.1-1_all.deb ... 178s Unpacking python3-snowballstemmer (3.0.1-1) ... 178s Selecting previously unselected package python3-sphinx. 178s Preparing to unpack .../189-python3-sphinx_8.2.3-12_all.deb ... 178s Unpacking python3-sphinx (8.2.3-12) ... 178s Selecting previously unselected package python3-nbsphinx. 178s Preparing to unpack .../190-python3-nbsphinx_0.9.5+ds-1_all.deb ... 178s Unpacking python3-nbsphinx (0.9.5+ds-1) ... 178s Selecting previously unselected package python3-pluggy. 178s Preparing to unpack .../191-python3-pluggy_1.6.0-2_all.deb ... 178s Unpacking python3-pluggy (1.6.0-2) ... 178s Selecting previously unselected package python3-propcache. 178s Preparing to unpack .../192-python3-propcache_0.3.1-1build1_ppc64el.deb ... 178s Unpacking python3-propcache (0.3.1-1build1) ... 178s Selecting previously unselected package python3-pydata-sphinx-theme. 178s Preparing to unpack .../193-python3-pydata-sphinx-theme_0.16.1+dfsg-5_all.deb ... 178s Unpacking python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 178s Selecting previously unselected package python3-pystac. 178s Preparing to unpack .../194-python3-pystac_1.14.3-1_all.deb ... 178s Unpacking python3-pystac (1.14.3-1) ... 178s Selecting previously unselected package python3-pytest. 178s Preparing to unpack .../195-python3-pytest_9.0.2-2_all.deb ... 178s Unpacking python3-pytest (9.0.2-2) ... 178s Selecting previously unselected package python3-pytest-mock. 178s Preparing to unpack .../196-python3-pytest-mock_3.15.1-1_all.deb ... 178s Unpacking python3-pytest-mock (3.15.1-1) ... 178s Selecting previously unselected package python3-wrapt. 178s Preparing to unpack .../197-python3-wrapt_1.17.3-3_ppc64el.deb ... 178s Unpacking python3-wrapt (1.17.3-3) ... 178s Selecting previously unselected package python3-yarl. 178s Preparing to unpack .../198-python3-yarl_1.22.0-1_ppc64el.deb ... 178s Unpacking python3-yarl (1.22.0-1) ... 178s Selecting previously unselected package python3-vcr. 178s Preparing to unpack .../199-python3-vcr_7.0.0-2_all.deb ... 178s Unpacking python3-vcr (7.0.0-2) ... 178s Selecting previously unselected package python3-pytest-recording. 178s Preparing to unpack .../200-python3-pytest-recording_0.13.4-1_all.deb ... 178s Unpacking python3-pytest-recording (0.13.4-1) ... 178s Selecting previously unselected package python3-rasterio. 178s Preparing to unpack .../201-python3-rasterio_1.4.3-2build2_ppc64el.deb ... 178s Unpacking python3-rasterio (1.4.3-2build2) ... 179s Selecting previously unselected package python3-requests-mock. 179s Preparing to unpack .../202-python3-requests-mock_1.12.1-4_all.deb ... 179s Unpacking python3-requests-mock (1.12.1-4) ... 179s Selecting previously unselected package python3-shapely. 179s Preparing to unpack .../203-python3-shapely_2.1.2-1ubuntu1_ppc64el.deb ... 179s Unpacking python3-shapely (2.1.2-1ubuntu1) ... 179s Selecting previously unselected package python3-starlette. 179s Preparing to unpack .../204-python3-starlette_0.50.0-1_all.deb ... 179s Unpacking python3-starlette (0.50.0-1) ... 179s Selecting previously unselected package python3-uvloop. 179s Preparing to unpack .../205-python3-uvloop_0.22.1+ds1-2_ppc64el.deb ... 179s Unpacking python3-uvloop (0.22.1+ds1-2) ... 179s Selecting previously unselected package python3-wsproto. 179s Preparing to unpack .../206-python3-wsproto_1.3.2-1_all.deb ... 179s Unpacking python3-wsproto (1.3.2-1) ... 179s Selecting previously unselected package python3-uvicorn. 179s Preparing to unpack .../207-python3-uvicorn_0.38.0-1_all.deb ... 179s Unpacking python3-uvicorn (0.38.0-1) ... 179s Selecting previously unselected package python3-watchfiles. 179s Preparing to unpack .../208-python3-watchfiles_1.1.1-2_ppc64el.deb ... 179s Unpacking python3-watchfiles (1.1.1-2) ... 179s Selecting previously unselected package python3-websockets. 179s Preparing to unpack .../209-python3-websockets_15.0.1-1build1_ppc64el.deb ... 179s Unpacking python3-websockets (15.0.1-1build1) ... 179s Selecting previously unselected package python3-sphinx-autobuild. 179s Preparing to unpack .../210-python3-sphinx-autobuild_2025.08.25-1_all.deb ... 179s Unpacking python3-sphinx-autobuild (2025.08.25-1) ... 179s Selecting previously unselected package python3-sphinx-design. 179s Preparing to unpack .../211-python3-sphinx-design_0.6.1-2_all.deb ... 179s Unpacking python3-sphinx-design (0.6.1-2) ... 179s Selecting previously unselected package libjs-mathjax. 179s Preparing to unpack .../212-libjs-mathjax_2.7.9+dfsg-1build1_all.deb ... 179s Unpacking libjs-mathjax (2.7.9+dfsg-1build1) ... 179s Setting up dh-python (7.20251231) ... 180s Setting up liblcms2-2:ppc64el (2.17-1) ... 180s Setting up python3-iniconfig (2.1.0-2) ... 180s Setting up python3-sniffio (1.3.1-1) ... 180s Setting up python3-tornado (6.5.4-0.1) ... 181s Setting up libnorm1t64:ppc64el (1.5.9+dfsg-4) ... 181s Setting up libsharpyuv0:ppc64el (1.5.0-0.1build1) ... 181s Setting up libgpgmepp6t64:ppc64el (1.24.2-3ubuntu2) ... 181s Setting up libaom3:ppc64el (3.13.1-2) ... 181s Setting up mysql-common (5.8+1.1.1ubuntu2) ... 181s update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode 181s Setting up python3-pure-eval (0.2.3-1) ... 181s Setting up fonts-mathjax (2.7.9+dfsg-1build1) ... 181s Setting up libsodium23:ppc64el (1.0.18-2) ... 181s Setting up liblerc4:ppc64el (4.0.0+ds-5ubuntu2) ... 181s Setting up proj-data (9.7.1-1) ... 181s Setting up python-pystac-doc (1.14.3-1) ... 181s Setting up libjs-mathjax (2.7.9+dfsg-1build1) ... 181s Setting up python3-anyio (4.11.0-3) ... 181s Setting up python3-parso (0.8.5-1) ... 182s Setting up libogdi4.1:ppc64el (4.1.1+ds-5) ... 182s Setting up python3-colorama (0.4.6-4build1) ... 182s Setting up python3-defusedxml (0.7.1-3build1) ... 182s Setting up libarchive-zip-perl (1.68-1) ... 182s Setting up python3-alabaster (0.7.16-0.1build1) ... 182s Setting up libdebhelper-perl (13.28ubuntu1) ... 182s Setting up libpq5:ppc64el (18.1-2) ... 182s Setting up libdeflate0:ppc64el (1.23-2) ... 182s Setting up m4 (1.4.20-2) ... 182s Setting up python3-watchfiles (1.1.1-2) ... 182s Setting up libqhull-r8.0:ppc64el (2020.2-8) ... 182s Setting up node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 182s Setting up python3-starlette (0.50.0-1) ... 183s Setting up python3-pandocfilters (1.5.1-1) ... 183s Setting up libxerces-c3.2t64:ppc64el (3.2.4+debian-1.3build2) ... 183s Setting up libgomp1:ppc64el (15.2.0-11ubuntu1) ... 183s Setting up python3-click (8.2.0+0.really.8.1.8-1build1) ... 183s Setting up libabsl20240722:ppc64el (20240722.0-4ubuntu1) ... 183s Setting up libmysqlclient24:ppc64el (8.4.7-0ubuntu3) ... 183s Setting up python3-wheel (0.46.1-2) ... 183s Setting up libjbig0:ppc64el (2.1-6.1ubuntu3) ... 183s Setting up python3-webencodings (0.5.1-5build1) ... 183s Setting up libaec0:ppc64el (1.1.4-2) ... 183s Setting up python3-platformdirs (4.5.1-1) ... 184s Setting up python3-psutil (7.1.0-1ubuntu1) ... 184s Setting up gdal-data (3.12.1+dfsg-1) ... 184s Setting up python3-multidict (6.4.3-1build1) ... 184s Setting up libsnappy1v5:ppc64el (1.2.2-2) ... 184s Setting up python3-jupyterlab-pygments (0.2.2-3build1) ... 184s Setting up libpgm-5.3-0t64:ppc64el (5.3.128~dfsg-2.1build2) ... 184s Setting up python3-decorator (5.2.1-2) ... 185s Setting up autotools-dev (20240727.1) ... 185s Setting up libblas3:ppc64el (3.12.1-7ubuntu1) ... 185s update-alternatives: using /usr/lib/powerpc64le-linux-gnu/blas/libblas.so.3 to provide /usr/lib/powerpc64le-linux-gnu/libblas.so.3 (libblas.so.3-powerpc64le-linux-gnu) in auto mode 185s Setting up libcfitsio10t64:ppc64el (4.6.3-1) ... 185s Setting up python3-wcwidth (0.2.14+dfsg1-1build1) ... 185s Setting up python3-pyproject-hooks (1.2.0-1) ... 185s Setting up python3-accessible-pygments (0.0.5-2build1) ... 185s Setting up python3-typeshed (0.0~git20241223.ea91db2-4) ... 185s Setting up python3-snowballstemmer (3.0.1-1) ... 186s Setting up python3-requests-mock (1.12.1-4) ... 186s Setting up libquadmath0:ppc64el (15.2.0-11ubuntu1) ... 186s Setting up fonts-dejavu-mono (2.37-8build1) ... 186s Setting up libmpc3:ppc64el (1.3.1-2) ... 186s Setting up python3-numpy-dev:ppc64el (1:2.3.5+ds-3) ... 186s Setting up python3-wrapt (1.17.3-3) ... 186s Setting up python3-h11 (0.14.0-1.1) ... 186s Setting up autopoint (0.23.2-1) ... 186s Setting up python3-click-plugins (1.1.1-5) ... 187s Setting up fonts-dejavu-core (2.37-8build1) ... 187s Setting up unixodbc-common (2.3.14-1) ... 187s Setting up libjpeg-turbo8:ppc64el (2.1.5-4ubuntu2) ... 187s Setting up python3-html5lib (1.2-3) ... 187s Setting up libltdl7:ppc64el (2.5.4-9) ... 187s Setting up python3-uvloop (0.22.1+ds1-2) ... 187s Setting up python3-installer (0.7.0+dfsg1-3) ... 187s Setting up libgfortran5:ppc64el (15.2.0-11ubuntu1) ... 187s Setting up autoconf (2.72-3.1ubuntu1) ... 187s Setting up python3-pluggy (1.6.0-2) ... 188s Setting up libwebp7:ppc64el (1.5.0-0.1build1) ... 188s Setting up libubsan1:ppc64el (15.2.0-11ubuntu1) ... 188s Setting up python3-fastjsonschema (2.21.1-1) ... 188s Setting up libgif7:ppc64el (5.2.2-1ubuntu3) ... 188s Setting up libodbc2:ppc64el (2.3.14-1) ... 188s Setting up libgav1-2:ppc64el (0.20.0-2) ... 188s Setting up libgeos3.14.1:ppc64el (3.14.1-2) ... 188s Setting up liburiparser1:ppc64el (0.9.8+dfsg-2) ... 188s Setting up libfyba0t64:ppc64el (4.1.1-11build2) ... 188s Setting up dwz (0.16-2) ... 188s Setting up libdav1d7:ppc64el (1.5.3-1) ... 188s Setting up libminizip1t64:ppc64el (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 188s Setting up python3-astroid (4.0.2-1ubuntu1) ... 188s Setting up python3-livereload (2.7.1-0.1) ... 189s Setting up python3-propcache (0.3.1-1build1) ... 189s Setting up python3-traitlets (5.14.3+really5.14.3-2) ... 189s Setting up libasan8:ppc64el (15.2.0-11ubuntu1) ... 189s Setting up python-tinycss2-common (1.5.1-1) ... 189s Setting up libjson-perl (4.10000-1) ... 189s Setting up libblosc1:ppc64el (1.21.5+ds-2) ... 189s Setting up debugedit (1:5.2-3) ... 189s Setting up python3-roman-numerals (4.1.0-1) ... 189s Setting up liblua5.4-0:ppc64el (5.4.8-1) ... 189s Setting up libopenjp2-7:ppc64el (2.5.4-1) ... 189s Setting up python3.13-minimal (3.13.11-1) ... 190s Setting up sgml-base (1.31+nmu1) ... 190s Setting up pandoc-data (3.1.11.1-3build1) ... 190s Setting up libtsan2:ppc64el (15.2.0-11ubuntu1) ... 190s Setting up libisl23:ppc64el (0.27-1build1) ... 190s Setting up python3-affine (2.4.0-2) ... 190s Setting up python3-build (1.2.2-5) ... 191s Setting up libde265-0:ppc64el (1.0.16-1build1) ... 191s Setting up libkmlbase1t64:ppc64el (1.3.0-13) ... 191s Setting up python3-yarl (1.22.0-1) ... 191s Setting up python3-mistune (3.1.4-1) ... 191s Setting up python3-soupsieve (2.8.1-1) ... 191s Setting up libcc1-0:ppc64el (15.2.0-11ubuntu1) ... 191s Setting up python3-jupyter-core (5.9.1-1) ... 191s Setting up liblsan0:ppc64el (15.2.0-11ubuntu1) ... 191s Setting up libsz2:ppc64el (1.1.4-2) ... 191s Setting up libitm1:ppc64el (15.2.0-11ubuntu1) ... 191s Setting up python3-imagesize (1.4.1-1build1) ... 192s Setting up gdal-plugins:ppc64el (3.12.1+dfsg-1) ... 192s Setting up python3-websockets (15.0.1-1build1) ... 192s Setting up python3-pystac (1.14.3-1) ... 192s Setting up libjpeg8:ppc64el (8c-2ubuntu11) ... 192s Setting up automake (1:1.18.1-3build1) ... 192s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 192s Setting up python3-prompt-toolkit (3.0.52-2) ... 193s Setting up libfile-stripnondeterminism-perl (1.15.0-1build1) ... 193s Setting up libodbcinst2:ppc64el (2.3.14-1) ... 193s Setting up liblapack3:ppc64el (3.12.1-7ubuntu1) ... 193s update-alternatives: using /usr/lib/powerpc64le-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/powerpc64le-linux-gnu/liblapack.so.3 (liblapack.so.3-powerpc64le-linux-gnu) in auto mode 193s Setting up gettext (0.23.2-1) ... 193s Setting up libarpack2t64:ppc64el (3.9.1-6) ... 193s Setting up python3-tinycss2 (1.5.1-1) ... 193s Setting up libgcc-15-dev:ppc64el (15.2.0-11ubuntu1) ... 193s Setting up libzmq5:ppc64el (4.3.5-1build3) ... 193s Setting up python3-wsproto (1.3.2-1) ... 194s Setting up python3-jedi (0.19.1+ds1-1build1) ... 194s Setting up python3.13 (3.13.11-1) ... 195s Setting up python3-asttokens (3.0.1-1) ... 196s Setting up pybuild-plugin-pyproject (7.20251231) ... 196s Setting up fontconfig-config (2.15.0-2.4ubuntu1) ... 196s Setting up python3-pytest (9.0.2-2) ... 196s Setting up libgeos-c1t64:ppc64el (3.14.1-2) ... 196s Setting up python3-cligj (0.7.2-3) ... 197s Setting up python3-all (3.14.2-1) ... 197s Setting up python3-nbformat (5.10.4-1) ... 197s Setting up python3-bs4 (4.14.3-2build1) ... 197s Setting up intltool-debian (0.35.0+20060710.6build1) ... 197s Setting up python3-bleach (6.3.0-1) ... 197s Setting up python3-matplotlib-inline (0.2.1-1) ... 197s Setting up libkmldom1t64:ppc64el (1.3.0-13) ... 197s Setting up cpp-15-powerpc64le-linux-gnu (15.2.0-11ubuntu1) ... 197s Setting up libstdc++-15-dev:ppc64el (15.2.0-11ubuntu1) ... 197s Setting up pandoc (3.1.11.1+ds-4) ... 197s Setting up python3-executing (2.2.1-0.1) ... 198s Setting up python3-zmq (27.1.0-1) ... 198s Setting up sphinx-common (8.2.3-12) ... 198s Setting up python3-vcr (7.0.0-2) ... 198s Setting up python3-numpy (1:2.3.5+ds-3) ... 202s Setting up libhdf4-0-alt:ppc64el (4.3.0-1) ... 202s Setting up dh-strip-nondeterminism (1.15.0-1build1) ... 202s Setting up librttopo1:ppc64el (1.1.0-4) ... 202s Setting up libhdf5-310:ppc64el (1.14.5+repack-4) ... 202s Setting up libfreexl1:ppc64el (2.0.0-1build3) ... 202s Setting up python3-pytest-mock (3.15.1-1) ... 202s Setting up cpp-15 (15.2.0-11ubuntu1) ... 202s Setting up libtiff6:ppc64el (4.7.0-3ubuntu3) ... 202s Setting up xml-core (0.19build1) ... 202s Setting up python3-jupyter-client (8.7.0-1) ... 202s Setting up libarmadillo14 (1:14.2.3+dfsg-1) ... 202s Setting up libfontconfig1:ppc64el (2.15.0-2.4ubuntu1) ... 202s Setting up libyuv0:ppc64el (0.0.1922.20260106-1) ... 202s Setting up python3-stack-data (0.6.3-3) ... 203s Setting up cpp-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 203s Setting up python3-pytest-recording (0.13.4-1) ... 203s Setting up libhdf5-hl-310:ppc64el (1.14.5+repack-4) ... 203s Setting up libavif16:ppc64el (1.3.0-1ubuntu3) ... 203s Setting up python3-shapely (2.1.2-1ubuntu1) ... 203s Setting up python3-uvicorn (0.38.0-1) ... 204s Setting up libpoppler147:ppc64el (25.03.0-11.1) ... 204s Setting up libproj25:ppc64el (9.7.1-1) ... 204s Setting up gcc-15-powerpc64le-linux-gnu (15.2.0-11ubuntu1) ... 204s Setting up po-debconf (1.0.22) ... 204s Setting up libnetcdf22:ppc64el (1:4.9.3-1build1) ... 204s Setting up libkmlengine1t64:ppc64el (1.3.0-13) ... 204s Setting up libgeotiff5:ppc64el (1.7.4-1) ... 204s Setting up python3-nbclient (0.10.4-1) ... 204s Setting up gcc-15 (15.2.0-11ubuntu1) ... 204s Setting up gcc-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 204s Setting up python3-ipython (8.35.0-2) ... 205s /usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:3141: SyntaxWarning: 'return' in a 'finally' block 205s return result 205s Setting up python3-nbconvert (7.16.6-1) ... 205s Setting up cpp (4:15.2.0-4ubuntu1) ... 205s Setting up libspatialite8t64:ppc64el (5.1.0-3ubuntu1) ... 205s Setting up g++-15-powerpc64le-linux-gnu (15.2.0-11ubuntu1) ... 205s Setting up libtool (2.5.4-9) ... 205s Setting up gcc (4:15.2.0-4ubuntu1) ... 205s Setting up dh-autoreconf (21) ... 205s Setting up g++-15 (15.2.0-11ubuntu1) ... 205s Setting up g++-powerpc64le-linux-gnu (4:15.2.0-4ubuntu1) ... 205s Setting up debhelper (13.28ubuntu1) ... 205s Setting up g++ (4:15.2.0-4ubuntu1) ... 205s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 205s Setting up build-essential (12.12ubuntu2) ... 205s Setting up pybuild-plugin-autopkgtest (7.20251231) ... 205s Setting up libheif-plugin-aomdec:ppc64el (1.21.2-1) ... 205s Setting up libheif1:ppc64el (1.21.2-1) ... 205s Setting up libgdal36:ppc64el (3.10.3+dfsg-1build3) ... 205s Setting up libheif-plugin-libde265:ppc64el (1.21.2-1) ... 205s Setting up python3-rasterio (1.4.3-2build2) ... 206s Processing triggers for install-info (7.2-5) ... 206s Processing triggers for libc-bin (2.42-2ubuntu4) ... 206s Processing triggers for systemd (259-1ubuntu2) ... 206s Processing triggers for man-db (2.13.1-1) ... 208s Processing triggers for sgml-base (1.31+nmu1) ... 208s Setting up docutils-common (0.22.4+dfsg-1) ... 208s Processing triggers for sgml-base (1.31+nmu1) ... 208s Setting up python3-docutils (0.22.4+dfsg-1) ... 209s Setting up python3-sphinx (8.2.3-12) ... 211s Setting up python3-sphinx-autobuild (2025.08.25-1) ... 211s Setting up python3-sphinx-design (0.6.1-2) ... 211s Setting up python3-nbsphinx (0.9.5+ds-1) ... 211s Setting up python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 213s autopkgtest [19:55:59]: test pybuild-autopkgtest: pybuild-autopkgtest 213s autopkgtest [19:55:59]: test pybuild-autopkgtest: [----------------------- 213s pybuild-autopkgtest 214s I: pybuild base:384: cd /tmp/autopkgtest.Yguavk/autopkgtest_tmp/build; python3.13 -m pytest tests 217s ============================= test session starts ============================== 217s platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0 217s rootdir: /tmp/autopkgtest.Yguavk/autopkgtest_tmp/build 217s configfile: pyproject.toml 217s plugins: recording-0.13.4, requests_mock-1.12.1, anyio-4.11.0, typeguard-4.4.4, mock-3.15.1 217s collected 1557 items 217s 218s tests/extensions/test_classification.py .................... [ 1%] 218s tests/extensions/test_custom.py ....... [ 1%] 218s tests/extensions/test_datacube.py ................................. [ 3%] 218s tests/extensions/test_eo.py .......................................... [ 6%] 219s tests/extensions/test_ext.py ........................................... [ 9%] 219s ....... [ 9%] 219s tests/extensions/test_file.py ................................. [ 11%] 219s tests/extensions/test_grid.py ............ [ 12%] 219s tests/extensions/test_mgrs.py ................... [ 13%] 219s tests/extensions/test_mlm.py ........................................... [ 16%] 219s ... [ 16%] 219s tests/extensions/test_pointcloud.py ...................... [ 18%] 221s tests/extensions/test_projection.py ................................... [ 20%] 221s tests/extensions/test_raster.py ......... [ 21%] 221s tests/extensions/test_render.py .................. [ 22%] 221s tests/extensions/test_sar.py ...................... [ 23%] 221s tests/extensions/test_sat.py .......................... [ 25%] 222s tests/extensions/test_scientific.py .................................... [ 27%] 222s . [ 27%] 222s tests/extensions/test_storage.py ................... [ 28%] 222s tests/extensions/test_table.py ......... [ 29%] 222s tests/extensions/test_timestamps.py ................. [ 30%] 222s tests/extensions/test_version.py .............................. [ 32%] 223s tests/extensions/test_view.py ....................... [ 33%] 223s tests/extensions/test_xarray_assets.py ..................... [ 35%] 223s tests/html/test_html.py .......... [ 35%] 223s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 223s tests/serialization/test_identify.py ................................... [ 38%] 223s ........................................................................ [ 43%] 223s .......................... [ 45%] 224s tests/serialization/test_migrate.py .................................... [ 47%] 224s ........................................................................ [ 51%] 224s ......................... [ 53%] 224s tests/test_asset.py ...............ssss [ 54%] 224s tests/test_cache.py .... [ 55%] 224s tests/test_catalog.py .................................................. [ 58%] 230s ........................................................................ [ 62%] 230s ................... [ 64%] 230s tests/test_collection.py ............................................... [ 67%] 230s ...... [ 67%] 230s tests/test_common_metadata.py ...................... [ 68%] 230s tests/test_item.py ..................................................... [ 72%] 230s [ 72%] 230s tests/test_item_assets.py ............. [ 73%] 230s tests/test_item_collection.py .................. [ 74%] 230s tests/test_layout.py ............................................. [ 77%] 230s tests/test_link.py ........................................... [ 79%] 230s tests/test_pystac_client.py s. [ 80%] 231s tests/test_stac_io.py ................ [ 81%] 231s tests/test_summaries.py ........... [ 81%] 231s tests/test_utils.py ................................ssssssss..s......... [ 85%] 232s ............................................................... [ 89%] 232s tests/test_version.py .. [ 89%] 253s tests/test_writing.py ..................... [ 90%] 253s tests/validation/test_schema_uri_map.py . [ 90%] 260s tests/validation/test_validate.py ...................................... [ 93%] 263s ........................................................................ [ 97%] 277s .................................. [100%] 277s 277s ================= 1539 passed, 18 skipped in 62.32s (0:01:02) ================== 277s I: pybuild base:384: cd /tmp/autopkgtest.Yguavk/autopkgtest_tmp/build; python3.14 -m pytest tests 280s ============================= test session starts ============================== 280s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 280s rootdir: /tmp/autopkgtest.Yguavk/autopkgtest_tmp/build 280s configfile: pyproject.toml 280s plugins: recording-0.13.4, requests_mock-1.12.1, anyio-4.11.0, typeguard-4.4.4, mock-3.15.1 280s collected 1557 items 280s 281s tests/extensions/test_classification.py ......EE.....E...... [ 1%] 281s tests/extensions/test_custom.py ....... [ 1%] 281s tests/extensions/test_datacube.py .......................E..EE..... [ 3%] 282s tests/extensions/test_eo.py .....EE.EE...............EE............... [ 6%] 282s tests/extensions/test_ext.py ........................................... [ 9%] 282s ....... [ 9%] 284s tests/extensions/test_file.py .....EEE.....EEEEE.EEEEE.......EE [ 11%] 284s tests/extensions/test_grid.py ..E.E....... [ 12%] 285s tests/extensions/test_mgrs.py ........E...EEE.... [ 13%] 285s tests/extensions/test_mlm.py .........................E...E............. [ 16%] 285s ... [ 16%] 286s tests/extensions/test_pointcloud.py ..EEEEEEE............. [ 18%] 287s tests/extensions/test_projection.py ..EEE.EE.EEEEE.........E........... [ 20%] 287s tests/extensions/test_raster.py .EE...... [ 21%] 287s tests/extensions/test_render.py ................EE [ 22%] 288s tests/extensions/test_sar.py .EE................... [ 23%] 289s tests/extensions/test_sat.py ...EEEEEEEEE..EE.......... [ 25%] 291s tests/extensions/test_scientific.py ...EEEEEEEEEE...EEEEEEEEEE.......... [ 27%] 291s . [ 27%] 291s tests/extensions/test_storage.py ..E............EEEE [ 28%] 292s tests/extensions/test_table.py E........ [ 29%] 292s tests/extensions/test_timestamps.py ..EEEE........... [ 30%] 294s tests/extensions/test_version.py ...EEEEEEEE......EE.EE....EE.. [ 32%] 294s tests/extensions/test_view.py ..EEEEEE............... [ 33%] 295s tests/extensions/test_xarray_assets.py ...........EE....EE.. [ 35%] 295s tests/html/test_html.py .......... [ 35%] 295s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 295s tests/serialization/test_identify.py ................................... [ 38%] 295s ........................................................................ [ 43%] 295s .......................... [ 45%] 296s tests/serialization/test_migrate.py .................................... [ 47%] 296s ........................................................................ [ 51%] 296s ......................... [ 53%] 296s tests/test_asset.py ...............ssss [ 54%] 296s tests/test_cache.py .... [ 55%] 296s tests/test_catalog.py ........E......................................... [ 58%] 299s ...........................EEEEEEEE.................................EE.. [ 62%] 299s ................... [ 64%] 299s tests/test_collection.py ............................................... [ 67%] 299s ...... [ 67%] 299s tests/test_common_metadata.py ...................... [ 68%] 300s tests/test_item.py ..........E.E..E....E......................E......... [ 72%] 300s [ 72%] 300s tests/test_item_assets.py ............. [ 73%] 300s tests/test_item_collection.py .................. [ 74%] 300s tests/test_layout.py ............................................. [ 77%] 300s tests/test_link.py ........................................... [ 79%] 300s tests/test_pystac_client.py s. [ 80%] 300s tests/test_stac_io.py ...........EE.EE [ 81%] 300s tests/test_summaries.py ........... [ 81%] 300s tests/test_utils.py ................................ssssssss..s......... [ 85%] 301s ............................................................... [ 89%] 301s tests/test_version.py .. [ 89%] 304s tests/test_writing.py EEEEEEEEEEEEEEEEEEEEE [ 90%] 304s tests/validation/test_schema_uri_map.py . [ 90%] 308s tests/validation/test_validate.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 93%] 316s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 97%] 319s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.... [100%] 319s 319s ==================================== ERRORS ==================================== 319s ____________________ ERROR at setup of test_apply_bitfields ____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_apply_classes _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of test_validate_classification ________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_validate ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_set_variables _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________________ ERROR at setup of test_set_dimensions _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_validate_eo ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________________ ERROR at setup of test_bands _________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_asset_bands ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_cloud_cover ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________ ERROR at setup of test_set_field[cloud_cover-7.8] _______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________ ERROR at setup of test_set_field[snow_cover-99] ________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_validate_item _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________ ERROR at setup of test_validate_collection __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________________ ERROR at setup of test_validate_catalog ____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________ ERROR at setup of test_set_field_on_asset[thumbnail-size-1] __________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___ ERROR at setup of test_set_field_on_asset[measurement-header_size-8192] ____ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of test_set_field_on_asset[thumbnail-byte_order-little-endian] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of test_set_field_on_asset[calibrations-local_path-different-file.xml] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________ ERROR at setup of test_set_field_on_link[about-size-129302] __________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of test_set_field_on_link[about-header_size-4092] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____ ERROR at setup of test_set_field_on_link[about-byte_order-big-endian] _____ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of test_set_field_on_link[about-local_path-a/path] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________ ERROR at setup of test_migrate_from_v2_0_0 __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________ ERROR at setup of test_migrate_from_v1_0_0 __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_attributes _______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________________ ERROR at setup of test_modify _________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_validate ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________ ERROR at setup of test_set_field[latitude_band-C] _______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________ ERROR at setup of test_set_field[grid_square-ZA] _______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of test_set_field[utm_zone-59] _________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________________ ERROR at setup of test_apply _________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_validate_mlm ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________ ERROR at setup of test_validate_pointcloud __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________________ ERROR at setup of test_count _________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________________ ERROR at setup of test_type __________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_encoding ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________________ ERROR at setup of test_schemas ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_statistics _______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________________ ERROR at setup of test_density ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_partial_apply _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_validate_proj _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________________ ERROR at setup of test_epsg __________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________________ ERROR at setup of test_wkt2 __________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_projjson ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_geometry ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________________ ERROR at setup of test_bbox __________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_centroid ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________________ ERROR at setup of test_shape _________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_transform _______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_get_set_code ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________________ ERROR at setup of test_validate_raster ____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_asset_bands ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_item_validate _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________ ERROR at setup of test_collection_validate __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_required ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________________ ERROR at setup of test_all __________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_no_args_fails _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_orbit_state ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________________ ERROR at setup of test_relative_orbit _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________________ ERROR at setup of test_absolute_orbit _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_anx_datetime ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________ ERROR at setup of test_platform_international_designator ___________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________ ERROR at setup of test_relative_orbit_no_negative _______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________________ ERROR at setup of test_both __________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________________ ERROR at setup of test_modify _________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________________ ERROR at setup of test_clear_orbit_state ___________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________ ERROR at setup of test_clear_relative_orbit __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________________ ERROR at setup of test_doi __________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_citation ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________________ ERROR at setup of test_publications_one ____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_publications ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of test_remove_publication_one _________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________ ERROR at setup of test_remove_all_publications_one ______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________ ERROR at setup of test_remove_publication_forward _______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________ ERROR at setup of test_remove_publication_reverse _______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________ ERROR at setup of test_remove_all_publications_with_some ___________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________ ERROR at setup of test_remove_all_publications_with_none ___________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________________ ERROR at setup of test_collection_doi _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________ ERROR at setup of test_collection_citation __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________ ERROR at setup of test_collection_publications_one ______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of test_collection_publications ________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________ ERROR at setup of test_collection_remove_publication_one ___________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________ ERROR at setup of test_collection_remove_all_publications_one _________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________ ERROR at setup of test_collection_remove_publication_forward _________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________ ERROR at setup of test_collection_remove_publication_reverse _________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____ ERROR at setup of test_collection_remove_all_publications_with_some ______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____ ERROR at setup of test_collection_remove_all_publications_with_none ______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________________ ERROR at setup of test_validate_storage ____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________________ ERROR at setup of test_asset_platform _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_asset_region ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________ ERROR at setup of test_asset_requester_pays __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_asset_tier _______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_validate ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_table' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________ ERROR at setup of test_validate_timestamps __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________________ ERROR at setup of test_expires ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_published _______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_unpublished ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_add_version ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________ ERROR at setup of test_version_in_properties _________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________ ERROR at setup of test_add_not_deprecated_version _______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of test_add_deprecated_version _________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________________ ERROR at setup of test_latest _________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_predecessor ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_successor _______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_all_links _______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of test_collection_add_version _________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of test_collection_validate_all ________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________ ERROR at setup of test_catalog_add_version __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________________ ERROR at setup of test_catalog_validate_all __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________________ ERROR at setup of test_optional_version ____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________________ ERROR at setup of test_assets _________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_validate_view _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________________ ERROR at setup of test_off_nadir _______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________________ ERROR at setup of test_incidence_angle ____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________________ ERROR at setup of test_azimuth ________________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______________________ ERROR at setup of test_sun_azimuth ______________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_sun_elevation _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_item_validate _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __________________ ERROR at setup of test_collection_validate __________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________ ERROR at setup of test_set_field[storage_options-value0] ___________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________ ERROR at setup of test_set_field[open_kwargs-value1] _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of TestCatalog.test_read_remote ________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of TestCatalog.test_validate_all[cat0] _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of TestCatalog.test_validate_all[cat1] _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of TestCatalog.test_validate_all[cat2] _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of TestCatalog.test_validate_all[cat3] _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of TestCatalog.test_validate_all[cat4] _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of TestCatalog.test_validate_all[cat5] _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of TestCatalog.test_validate_all[cat6] _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________ ERROR at setup of TestCatalog.test_validate_all_invalid ____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of test_validate_all_with_max_n ________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of test_validate_all_with_recusive_off _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_catalog' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_null_datetime _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_item' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________ ERROR at setup of test_null_datetime_constructor _______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_item' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_null_geometry _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_item' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________________ ERROR at setup of test_relative_extension_path ________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_item' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of test_non_hierarchical_relative_link _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_item' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________________ ERROR at setup of test_retry_stac_io _____________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ___________________ ERROR at setup of test_retry_stac_io_404 ___________________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ____________ ERROR at setup of test_urls_with_non_ascii_characters _____________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____________ ERROR at setup of test_proj_json_schema_is_readable ______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog0] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog1] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog2] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog3] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog4] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog5] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog6] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog0] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog1] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog2] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog3] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog4] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog5] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog6] _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog0] ___ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog1] ___ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog2] ___ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog3] ___ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog4] ___ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog5] ___ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog6] ___ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/cassettes/test_writing' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _________ ERROR at setup of TestValidate.test_validate_current_version _________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example0] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example1] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example2] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example3] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example4] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example5] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example6] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example7] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example8] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example9] ________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example10] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example11] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example12] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example13] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example14] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example15] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example16] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example17] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example18] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example19] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example20] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example21] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example22] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example23] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example24] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example25] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example26] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example27] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example28] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example29] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example30] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example31] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example32] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example33] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example34] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example35] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example36] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example37] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example38] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example39] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example40] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example41] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example42] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example43] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example44] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example45] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example46] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example47] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example48] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example49] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example50] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example51] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example52] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example53] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example54] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example55] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example56] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example57] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example58] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example59] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example60] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example61] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example62] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example63] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example64] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example65] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example66] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example67] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example68] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example69] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example70] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example71] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example72] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example73] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example74] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example75] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example76] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example77] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example78] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example79] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example80] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example81] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example82] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example83] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example84] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example85] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example86] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example87] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example88] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example89] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example90] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example91] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example92] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example93] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example94] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example95] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example96] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example97] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example98] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_examples[example99] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example100] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example101] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example102] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example103] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example104] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example105] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example106] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example107] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example108] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example109] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example110] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example111] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example112] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example113] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example114] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example115] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example116] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example117] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example118] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example119] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example120] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example121] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example122] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example123] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_examples[example124] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_error_contains_href _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _____ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg _____ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg_missing_href _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______ ERROR at setup of TestValidate.test_validate_all_unexpected_href _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _______________ ERROR at setup of TestValidate.test_validate_all _______________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case0] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case1] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case2] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case3] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case4] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case5] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case6] _______ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s _ ERROR at setup of TestValidate.test_validates_geojson_with_tuple_coordinates _ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s ________ ERROR at setup of TestValidate.test_validate_custom_validator _________ 319s 319s request = > 319s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 319s vcr_cassette_dir = '/tmp/autopkgtest.Yguavk/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 319s record_mode = 'none', disable_recording = False 319s pytestconfig = <_pytest.config.Config object at 0x78c977aa46e0> 319s 319s @pytest.fixture(autouse=True) # type: ignore 319s def vcr( 319s request: SubRequest, 319s vcr_markers: List[Mark], 319s vcr_cassette_dir: str, 319s record_mode: str, 319s disable_recording: bool, 319s pytestconfig: Config, 319s ) -> Iterator[Optional["Cassette"]]: 319s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 319s if disable_recording: 319s yield None 319s elif vcr_markers: 319s > from ._vcr import use_cassette 319s 319s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 319s from vcr import VCR 319s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 319s from .config import VCR 319s /usr/lib/python3/dist-packages/vcr/config.py:10: in 319s from .cassette import Cassette 319s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 319s from .patch import CassettePatcherBuilder 319s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 319s import httplib2 319s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 319s from . import auth 319s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 319s import pyparsing as pp 319s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 319s 319s # module pyparsing.py 319s # 319s # Copyright (c) 2003-2022 Paul T. McGuire 319s # 319s # Permission is hereby granted, free of charge, to any person obtaining 319s # a copy of this software and associated documentation files (the 319s # "Software"), to deal in the Software without restriction, including 319s # without limitation the rights to use, copy, modify, merge, publish, 319s # distribute, sublicense, and/or sell copies of the Software, and to 319s # permit persons to whom the Software is furnished to do so, subject to 319s # the following conditions: 319s # 319s # The above copyright notice and this permission notice shall be 319s # included in all copies or substantial portions of the Software. 319s # 319s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 319s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 319s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 319s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 319s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 319s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 319s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 319s # 319s 319s __doc__ = """ 319s pyparsing module - Classes and methods to define and execute parsing grammars 319s ============================================================================= 319s 319s The pyparsing module is an alternative approach to creating and 319s executing simple grammars, vs. the traditional lex/yacc approach, or the 319s use of regular expressions. With pyparsing, you don't need to learn 319s a new syntax for defining grammars or matching expressions - the parsing 319s module provides a library of classes that you use to construct the 319s grammar directly in Python. 319s 319s Here is a program to parse "Hello, World!" (or any greeting of the form 319s ``", !"``), built up using :class:`Word`, 319s :class:`Literal`, and :class:`And` elements 319s (the :meth:`'+'` operators create :class:`And` expressions, 319s and the strings are auto-converted to :class:`Literal` expressions):: 319s 319s from pyparsing import Word, alphas 319s 319s # define grammar of a greeting 319s greet = Word(alphas) + "," + Word(alphas) + "!" 319s 319s hello = "Hello, World!" 319s print(hello, "->", greet.parse_string(hello)) 319s 319s The program outputs the following:: 319s 319s Hello, World! -> ['Hello', ',', 'World', '!'] 319s 319s The Python representation of the grammar is quite readable, owing to the 319s self-explanatory class names, and the use of :class:`'+'`, 319s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 319s 319s The :class:`ParseResults` object returned from 319s :class:`ParserElement.parse_string` can be 319s accessed as a nested list, a dictionary, or an object with named 319s attributes. 319s 319s The pyparsing module handles some of the problems that are typically 319s vexing when writing text parsers: 319s 319s - extra or missing whitespace (the above program will also handle 319s "Hello,World!", "Hello , World !", etc.) 319s - quoted strings 319s - embedded comments 319s 319s 319s Getting Started - 319s ----------------- 319s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 319s see the base classes that most other pyparsing 319s classes inherit from. Use the docstrings for examples of how to: 319s 319s - construct literal match expressions from :class:`Literal` and 319s :class:`CaselessLiteral` classes 319s - construct character word-group expressions using the :class:`Word` 319s class 319s - see how to create repetitive expressions using :class:`ZeroOrMore` 319s and :class:`OneOrMore` classes 319s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 319s and :class:`'&'` operators to combine simple expressions into 319s more complex ones 319s - associate names with your parsed results using 319s :class:`ParserElement.set_results_name` 319s - access the parsed data, which is returned as a :class:`ParseResults` 319s object 319s - find some helpful expression short-cuts like :class:`DelimitedList` 319s and :class:`one_of` 319s - find more useful common expressions in the :class:`pyparsing_common` 319s namespace class 319s """ 319s from typing import NamedTuple 319s 319s 319s class version_info(NamedTuple): 319s major: int 319s minor: int 319s micro: int 319s releaselevel: str 319s serial: int 319s 319s @property 319s def __version__(self): 319s return ( 319s f"{self.major}.{self.minor}.{self.micro}" 319s + ( 319s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 319s "", 319s )[self.releaselevel == "final"] 319s ) 319s 319s def __str__(self): 319s return f"{__name__} {self.__version__} / {__version_time__}" 319s 319s def __repr__(self): 319s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 319s 319s 319s __version_info__ = version_info(3, 1, 3, "final", 1) 319s __version_time__ = "24 Aug 2024 23:47 UTC" 319s __version__ = __version_info__.__version__ 319s __versionTime__ = __version_time__ 319s __author__ = "Paul McGuire " 319s 319s from .util import * 319s from .exceptions import * 319s from .actions import * 319s > from .core import __diag__, __compat__ 319s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 319s E return f"{type(self).__name__}: {retString}" 319s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 319s E SyntaxError: 'return' in a 'finally' block 319s 319s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 319s =========================== short test summary info ============================ 319s ERROR tests/extensions/test_classification.py::test_apply_bitfields - File ... 319s ERROR tests/extensions/test_classification.py::test_apply_classes - File "/... 319s ERROR tests/extensions/test_classification.py::test_validate_classification 319s ERROR tests/extensions/test_datacube.py::test_validate - File "/usr/lib/pyt... 319s ERROR tests/extensions/test_datacube.py::test_set_variables - File "/usr/li... 319s ERROR tests/extensions/test_datacube.py::test_set_dimensions - File "/usr/l... 319s ERROR tests/extensions/test_eo.py::test_validate_eo - File "/usr/lib/python... 319s ERROR tests/extensions/test_eo.py::test_bands - File "/usr/lib/python3/dist... 319s ERROR tests/extensions/test_eo.py::test_asset_bands - File "/usr/lib/python... 319s ERROR tests/extensions/test_eo.py::test_cloud_cover - File "/usr/lib/python... 319s ERROR tests/extensions/test_eo.py::test_set_field[cloud_cover-7.8] - File "... 319s ERROR tests/extensions/test_eo.py::test_set_field[snow_cover-99] - File "/u... 319s ERROR tests/extensions/test_file.py::test_validate_item - File "/usr/lib/py... 319s ERROR tests/extensions/test_file.py::test_validate_collection - File "/usr/... 319s ERROR tests/extensions/test_file.py::test_validate_catalog - File "/usr/lib... 319s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-size-1] 319s ERROR tests/extensions/test_file.py::test_set_field_on_asset[measurement-header_size-8192] 319s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] 319s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-byte_order-little-endian] 319s ERROR tests/extensions/test_file.py::test_set_field_on_asset[calibrations-local_path-different-file.xml] 319s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-size-129302] 319s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-header_size-4092] 319s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] 319s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-byte_order-big-endian] 319s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-local_path-a/path] 319s ERROR tests/extensions/test_file.py::test_migrate_from_v2_0_0 - File "/usr/... 319s ERROR tests/extensions/test_file.py::test_migrate_from_v1_0_0 - File "/usr/... 319s ERROR tests/extensions/test_grid.py::test_attributes - File "/usr/lib/pytho... 319s ERROR tests/extensions/test_grid.py::test_modify - File "/usr/lib/python3/d... 319s ERROR tests/extensions/test_mgrs.py::test_validate - File "/usr/lib/python3... 319s ERROR tests/extensions/test_mgrs.py::test_set_field[latitude_band-C] - File... 319s ERROR tests/extensions/test_mgrs.py::test_set_field[grid_square-ZA] - File ... 319s ERROR tests/extensions/test_mgrs.py::test_set_field[utm_zone-59] - File "/u... 319s ERROR tests/extensions/test_mlm.py::test_apply - File "/usr/lib/python3/dis... 319s ERROR tests/extensions/test_mlm.py::test_validate_mlm - File "/usr/lib/pyth... 319s ERROR tests/extensions/test_pointcloud.py::test_validate_pointcloud - File ... 319s ERROR tests/extensions/test_pointcloud.py::test_count - File "/usr/lib/pyth... 319s ERROR tests/extensions/test_pointcloud.py::test_type - File "/usr/lib/pytho... 319s ERROR tests/extensions/test_pointcloud.py::test_encoding - File "/usr/lib/p... 319s ERROR tests/extensions/test_pointcloud.py::test_schemas - File "/usr/lib/py... 319s ERROR tests/extensions/test_pointcloud.py::test_statistics - File "/usr/lib... 319s ERROR tests/extensions/test_pointcloud.py::test_density - File "/usr/lib/py... 319s ERROR tests/extensions/test_projection.py::test_partial_apply - File "/usr/... 319s ERROR tests/extensions/test_projection.py::test_validate_proj - File "/usr/... 319s ERROR tests/extensions/test_projection.py::test_epsg - File "/usr/lib/pytho... 319s ERROR tests/extensions/test_projection.py::test_wkt2 - File "/usr/lib/pytho... 319s ERROR tests/extensions/test_projection.py::test_projjson - File "/usr/lib/p... 319s ERROR tests/extensions/test_projection.py::test_geometry - File "/usr/lib/p... 319s ERROR tests/extensions/test_projection.py::test_bbox - File "/usr/lib/pytho... 319s ERROR tests/extensions/test_projection.py::test_centroid - File "/usr/lib/p... 319s ERROR tests/extensions/test_projection.py::test_shape - File "/usr/lib/pyth... 319s ERROR tests/extensions/test_projection.py::test_transform - File "/usr/lib/... 319s ERROR tests/extensions/test_projection.py::test_get_set_code - File "/usr/l... 319s ERROR tests/extensions/test_raster.py::test_validate_raster - File "/usr/li... 319s ERROR tests/extensions/test_raster.py::test_asset_bands - File "/usr/lib/py... 319s ERROR tests/extensions/test_render.py::test_item_validate - File "/usr/lib/... 319s ERROR tests/extensions/test_render.py::test_collection_validate - File "/us... 319s ERROR tests/extensions/test_sar.py::test_required - File "/usr/lib/python3/... 319s ERROR tests/extensions/test_sar.py::test_all - File "/usr/lib/python3/dist-... 319s ERROR tests/extensions/test_sat.py::test_no_args_fails - File "/usr/lib/pyt... 319s ERROR tests/extensions/test_sat.py::test_orbit_state - File "/usr/lib/pytho... 319s ERROR tests/extensions/test_sat.py::test_relative_orbit - File "/usr/lib/py... 319s ERROR tests/extensions/test_sat.py::test_absolute_orbit - File "/usr/lib/py... 319s ERROR tests/extensions/test_sat.py::test_anx_datetime - File "/usr/lib/pyth... 319s ERROR tests/extensions/test_sat.py::test_platform_international_designator - ... 319s ERROR tests/extensions/test_sat.py::test_relative_orbit_no_negative - File ... 319s ERROR tests/extensions/test_sat.py::test_both - File "/usr/lib/python3/dist... 319s ERROR tests/extensions/test_sat.py::test_modify - File "/usr/lib/python3/di... 319s ERROR tests/extensions/test_sat.py::test_clear_orbit_state - File "/usr/lib... 319s ERROR tests/extensions/test_sat.py::test_clear_relative_orbit - File "/usr/... 319s ERROR tests/extensions/test_scientific.py::test_doi - File "/usr/lib/python... 319s ERROR tests/extensions/test_scientific.py::test_citation - File "/usr/lib/p... 319s ERROR tests/extensions/test_scientific.py::test_publications_one - File "/u... 319s ERROR tests/extensions/test_scientific.py::test_publications - File "/usr/l... 319s ERROR tests/extensions/test_scientific.py::test_remove_publication_one - Fi... 319s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_one 319s ERROR tests/extensions/test_scientific.py::test_remove_publication_forward - ... 319s ERROR tests/extensions/test_scientific.py::test_remove_publication_reverse - ... 319s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_some 319s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_none 319s ERROR tests/extensions/test_scientific.py::test_collection_doi - File "/usr... 319s ERROR tests/extensions/test_scientific.py::test_collection_citation - File ... 319s ERROR tests/extensions/test_scientific.py::test_collection_publications_one 319s ERROR tests/extensions/test_scientific.py::test_collection_publications - F... 319s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_one 319s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_one 319s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_forward 319s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_reverse 319s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_some 319s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_none 319s ERROR tests/extensions/test_storage.py::test_validate_storage - File "/usr/... 319s ERROR tests/extensions/test_storage.py::test_asset_platform - File "/usr/li... 319s ERROR tests/extensions/test_storage.py::test_asset_region - File "/usr/lib/... 319s ERROR tests/extensions/test_storage.py::test_asset_requester_pays - File "/... 319s ERROR tests/extensions/test_storage.py::test_asset_tier - File "/usr/lib/py... 319s ERROR tests/extensions/test_table.py::test_validate - File "/usr/lib/python... 319s ERROR tests/extensions/test_timestamps.py::test_validate_timestamps - File ... 319s ERROR tests/extensions/test_timestamps.py::test_expires - File "/usr/lib/py... 319s ERROR tests/extensions/test_timestamps.py::test_published - File "/usr/lib/... 319s ERROR tests/extensions/test_timestamps.py::test_unpublished - File "/usr/li... 319s ERROR tests/extensions/test_version.py::test_add_version - File "/usr/lib/p... 319s ERROR tests/extensions/test_version.py::test_version_in_properties - File "... 319s ERROR tests/extensions/test_version.py::test_add_not_deprecated_version - F... 319s ERROR tests/extensions/test_version.py::test_add_deprecated_version - File ... 319s ERROR tests/extensions/test_version.py::test_latest - File "/usr/lib/python... 319s ERROR tests/extensions/test_version.py::test_predecessor - File "/usr/lib/p... 319s ERROR tests/extensions/test_version.py::test_successor - File "/usr/lib/pyt... 319s ERROR tests/extensions/test_version.py::test_all_links - File "/usr/lib/pyt... 319s ERROR tests/extensions/test_version.py::test_collection_add_version - File ... 319s ERROR tests/extensions/test_version.py::test_collection_validate_all - File... 319s ERROR tests/extensions/test_version.py::test_catalog_add_version - File "/u... 319s ERROR tests/extensions/test_version.py::test_catalog_validate_all - File "/... 319s ERROR tests/extensions/test_version.py::test_optional_version - File "/usr/... 319s ERROR tests/extensions/test_version.py::test_assets - File "/usr/lib/python... 319s ERROR tests/extensions/test_view.py::test_validate_view - File "/usr/lib/py... 319s ERROR tests/extensions/test_view.py::test_off_nadir - File "/usr/lib/python... 319s ERROR tests/extensions/test_view.py::test_incidence_angle - File "/usr/lib/... 319s ERROR tests/extensions/test_view.py::test_azimuth - File "/usr/lib/python3/... 319s ERROR tests/extensions/test_view.py::test_sun_azimuth - File "/usr/lib/pyth... 319s ERROR tests/extensions/test_view.py::test_sun_elevation - File "/usr/lib/py... 319s ERROR tests/extensions/test_xarray_assets.py::test_item_validate - File "/u... 319s ERROR tests/extensions/test_xarray_assets.py::test_collection_validate - Fi... 319s ERROR tests/extensions/test_xarray_assets.py::test_set_field[storage_options-value0] 319s ERROR tests/extensions/test_xarray_assets.py::test_set_field[open_kwargs-value1] 319s ERROR tests/test_catalog.py::TestCatalog::test_read_remote - File "/usr/lib... 319s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat0] - File "/... 319s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat1] - File "/... 319s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat2] - File "/... 319s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat3] - File "/... 319s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat4] - File "/... 319s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat5] - File "/... 319s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat6] - File "/... 319s ERROR tests/test_catalog.py::TestCatalog::test_validate_all_invalid - File ... 319s ERROR tests/test_catalog.py::test_validate_all_with_max_n - File "/usr/lib/... 319s ERROR tests/test_catalog.py::test_validate_all_with_recusive_off - File "/u... 319s ERROR tests/test_item.py::test_null_datetime - File "/usr/lib/python3/dist-... 319s ERROR tests/test_item.py::test_null_datetime_constructor - File "/usr/lib/p... 319s ERROR tests/test_item.py::test_null_geometry - File "/usr/lib/python3/dist-... 319s ERROR tests/test_item.py::test_relative_extension_path - File "/usr/lib/pyt... 319s ERROR tests/test_item.py::test_non_hierarchical_relative_link - File "/usr/... 319s ERROR tests/test_stac_io.py::test_retry_stac_io - File "/usr/lib/python3/di... 319s ERROR tests/test_stac_io.py::test_retry_stac_io_404 - File "/usr/lib/python... 319s ERROR tests/test_stac_io.py::test_urls_with_non_ascii_characters - File "/u... 319s ERROR tests/test_stac_io.py::test_proj_json_schema_is_readable - File "/usr... 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog0] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog1] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog2] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog3] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog4] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog5] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog6] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog0] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog1] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog2] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog3] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog4] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog5] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog6] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog0] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog1] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog2] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog3] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog4] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog5] 319s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog6] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_current_version 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example0] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example1] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example2] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example3] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example4] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example5] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example6] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example7] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example8] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example9] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example10] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example11] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example12] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example13] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example14] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example15] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example16] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example17] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example18] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example19] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example20] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example21] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example22] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example23] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example24] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example25] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example26] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example27] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example28] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example29] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example30] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example31] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example32] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example33] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example34] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example35] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example36] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example37] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example38] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example39] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example40] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example41] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example42] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example43] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example44] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example45] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example46] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example47] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example48] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example49] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example50] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example51] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example52] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example53] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example54] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example55] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example56] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example57] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example58] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example59] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example60] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example61] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example62] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example63] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example64] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example65] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example66] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example67] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example68] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example69] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example70] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example71] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example72] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example73] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example74] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example75] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example76] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example77] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example78] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example79] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example80] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example81] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example82] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example83] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example84] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example85] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example86] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example87] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example88] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example89] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example90] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example91] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example92] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example93] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example94] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example95] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example96] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example97] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example98] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example99] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example100] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example101] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example102] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example103] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example104] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example105] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example106] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example107] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example108] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example109] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example110] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example111] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example112] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example113] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example114] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example115] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example116] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example117] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example118] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example119] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example120] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example121] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example122] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example123] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example124] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_error_contains_href 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg_missing_href 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_unexpected_href 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all - ... 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case0] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case1] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case2] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case3] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case4] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case5] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case6] 319s ERROR tests/validation/test_validate.py::TestValidate::test_validates_geojson_with_tuple_coordinates 319s ERROR tests/validation/test_validate.py::TestValidate::test_validate_custom_validator 319s ================ 1234 passed, 18 skipped, 305 errors in 41.11s ================= 320s E: pybuild pybuild:483: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.Yguavk/autopkgtest_tmp/build; python3.14 -m pytest tests 320s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p "3.13 3.14" returned exit code 13 320s make: *** [/tmp/yJQOpNUXQd/run:4: pybuild-autopkgtest] Error 25 320s pybuild-autopkgtest: error: /tmp/yJQOpNUXQd/run pybuild-autopkgtest returned exit code 2 320s autopkgtest [19:57:46]: test pybuild-autopkgtest: -----------------------] 320s pybuild-autopkgtest FAIL non-zero exit status 25 320s autopkgtest [19:57:46]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 321s autopkgtest [19:57:47]: @@@@@@@@@@@@@@@@@@@@ summary 321s pybuild-autopkgtest FAIL non-zero exit status 25