0s autopkgtest [12:16:29]: starting date and time: 2025-11-17 12:16:29+0000 0s autopkgtest [12:16:29]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [12:16:29]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.sofp1kf6/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python3-defaults --apt-upgrade astroid --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python3-defaults/3.13.7-2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-s390x-15.secgroup --name adt-resolute-s390x-astroid-20251117-121629-juju-7f2275-prod-proposed-migration-environment-20-98c03224-00fc-41b6-896f-b771284fc941 --image adt/ubuntu-resolute-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration-s390x -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 4s Creating nova instance adt-resolute-s390x-astroid-20251117-121629-juju-7f2275-prod-proposed-migration-environment-20-98c03224-00fc-41b6-896f-b771284fc941 from image adt/ubuntu-resolute-s390x-server-20251117.img (UUID a3a3e3b9-e6ba-478c-a5e9-fce6f0982a95)... 53s autopkgtest [12:17:22]: testbed dpkg architecture: s390x 53s autopkgtest [12:17:22]: testbed apt version: 3.1.11 53s autopkgtest [12:17:22]: @@@@@@@@@@@@@@@@@@@@ test bed setup 53s autopkgtest [12:17:22]: testbed release detected to be: None 54s autopkgtest [12:17:23]: updating testbed package index (apt update) 55s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [87.8 kB] 55s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 55s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 55s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 55s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [9848 B] 55s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [22.9 kB] 55s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [81.1 kB] 55s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [868 kB] 55s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x Packages [138 kB] 56s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/restricted s390x Packages [940 B] 56s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/universe s390x Packages [545 kB] 56s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse s390x Packages [10.6 kB] 56s Fetched 1764 kB in 1s (1331 kB/s) 56s Reading package lists... 57s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 57s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 57s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 57s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 58s Reading package lists... 58s Reading package lists... 58s Building dependency tree... 58s Reading state information... 58s Calculating upgrade... 58s The following packages will be upgraded: 58s libpython3-stdlib python3 python3-minimal usbutils 58s 4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 58s Need to get 148 kB of archives. 58s After this operation, 4096 B disk space will be freed. 58s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x python3-minimal s390x 3.13.7-2 [27.8 kB] 58s Get:2 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x python3 s390x 3.13.7-2 [23.9 kB] 58s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x libpython3-stdlib s390x 3.13.7-2 [10.6 kB] 58s Get:4 http://ftpmaster.internal/ubuntu resolute/main s390x usbutils s390x 1:019-1 [85.6 kB] 59s dpkg-preconfigure: unable to re-open stdin: No such file or directory 59s Fetched 148 kB in 0s (360 kB/s) 59s (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 ... 61309 files and directories currently installed.) 59s Preparing to unpack .../python3-minimal_3.13.7-2_s390x.deb ... 59s Unpacking python3-minimal (3.13.7-2) over (3.13.7-1) ... 59s Setting up python3-minimal (3.13.7-2) ... 59s (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 ... 61309 files and directories currently installed.) 59s Preparing to unpack .../python3_3.13.7-2_s390x.deb ... 59s running python pre-rtupdate hooks for python3.13... 59s Unpacking python3 (3.13.7-2) over (3.13.7-1) ... 59s Preparing to unpack .../libpython3-stdlib_3.13.7-2_s390x.deb ... 59s Unpacking libpython3-stdlib:s390x (3.13.7-2) over (3.13.7-1) ... 59s Preparing to unpack .../usbutils_1%3a019-1_s390x.deb ... 59s Unpacking usbutils (1:019-1) over (1:018-2) ... 59s Setting up usbutils (1:019-1) ... 59s Setting up libpython3-stdlib:s390x (3.13.7-2) ... 59s Setting up python3 (3.13.7-2) ... 59s running python rtupdate hooks for python3.13... 59s running python post-rtupdate hooks for python3.13... 59s Processing triggers for man-db (2.13.1-1) ... 60s autopkgtest [12:17:29]: upgrading testbed (apt dist-upgrade and autopurge) 60s Reading package lists... 60s Building dependency tree... 60s Reading state information... 60s Calculating upgrade... 61s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 61s Reading package lists... 61s Building dependency tree... 61s Reading state information... 61s Solving dependencies... 61s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 63s autopkgtest [12:17:32]: testbed running kernel: Linux 6.17.0-5-generic #5-Ubuntu SMP Mon Sep 22 08:56:47 UTC 2025 64s autopkgtest [12:17:33]: @@@@@@@@@@@@@@@@@@@@ apt-source astroid 65s Get:1 http://ftpmaster.internal/ubuntu resolute/universe astroid 3.3.8-2 (dsc) [2268 B] 65s Get:2 http://ftpmaster.internal/ubuntu resolute/universe astroid 3.3.8-2 (tar) [467 kB] 65s Get:3 http://ftpmaster.internal/ubuntu resolute/universe astroid 3.3.8-2 (diff) [5604 B] 65s gpgv: Signature made Sun Jan 19 13:16:35 2025 UTC 65s gpgv: using RSA key 8F6DE104377F3B11E741748731F3144544A1741A 65s gpgv: issuer "tchet@debian.org" 65s gpgv: Can't check signature: No public key 65s dpkg-source: warning: cannot verify inline signature for ./astroid_3.3.8-2.dsc: no acceptable signature found 65s autopkgtest [12:17:34]: testing package astroid version 3.3.8-2 66s autopkgtest [12:17:35]: build not needed 73s autopkgtest [12:17:42]: test pybuild-autopkgtest: preparing testbed 73s Reading package lists... 73s Building dependency tree... 73s Reading state information... 73s Solving dependencies... 73s The following NEW packages will be installed: 73s autoconf automake autopoint autotools-dev build-essential cpp cpp-15 73s cpp-15-s390x-linux-gnu cpp-s390x-linux-gnu debhelper debugedit dh-autoreconf 73s dh-python dh-strip-nondeterminism dwz g++ g++-15 g++-15-s390x-linux-gnu 73s g++-s390x-linux-gnu gcc gcc-15 gcc-15-s390x-linux-gnu gcc-s390x-linux-gnu 73s gettext intltool-debian libarchive-zip-perl libasan8 libcc1-0 73s libdebhelper-perl libfile-stripnondeterminism-perl libgcc-15-dev libgomp1 73s libisl23 libitm1 libmpc3 libpython3.14-minimal libpython3.14-stdlib 73s libstdc++-15-dev libtool libubsan1 m4 po-debconf pybuild-plugin-autopkgtest 73s pybuild-plugin-pyproject python3-all python3-astroid python3-build 73s python3-iniconfig python3-installer python3-lazy-object-proxy python3-pip 73s python3-pluggy python3-pyproject-hooks python3-pytest python3-pytest-runner 73s python3-wheel python3-wrapt python3.14 python3.14-minimal 74s 0 upgraded, 59 newly installed, 0 to remove and 0 not upgraded. 74s Need to get 64.6 MB of archives. 74s After this operation, 215 MB of additional disk space will be used. 74s Get:1 http://ftpmaster.internal/ubuntu resolute/main s390x libpython3.14-minimal s390x 3.14.0-4 [904 kB] 74s Get:2 http://ftpmaster.internal/ubuntu resolute/main s390x python3.14-minimal s390x 3.14.0-4 [2509 kB] 76s Get:3 http://ftpmaster.internal/ubuntu resolute/main s390x m4 s390x 1.4.20-2 [223 kB] 76s Get:4 http://ftpmaster.internal/ubuntu resolute/main s390x autoconf all 2.72-3.1ubuntu1 [384 kB] 76s Get:5 http://ftpmaster.internal/ubuntu resolute/main s390x autotools-dev all 20240727.1 [43.4 kB] 76s Get:6 http://ftpmaster.internal/ubuntu resolute/main s390x automake all 1:1.18.1-2 [581 kB] 76s Get:7 http://ftpmaster.internal/ubuntu resolute/main s390x autopoint all 0.23.2-1 [620 kB] 76s Get:8 http://ftpmaster.internal/ubuntu resolute/main s390x libisl23 s390x 0.27-1 [704 kB] 76s Get:9 http://ftpmaster.internal/ubuntu resolute/main s390x libmpc3 s390x 1.3.1-2 [57.4 kB] 76s Get:10 http://ftpmaster.internal/ubuntu resolute/main s390x cpp-15-s390x-linux-gnu s390x 15.2.0-7ubuntu1 [10.2 MB] 78s Get:11 http://ftpmaster.internal/ubuntu resolute/main s390x cpp-15 s390x 15.2.0-7ubuntu1 [1022 B] 78s Get:12 http://ftpmaster.internal/ubuntu resolute/main s390x cpp-s390x-linux-gnu s390x 4:15.2.0-4ubuntu1 [5746 B] 78s Get:13 http://ftpmaster.internal/ubuntu resolute/main s390x cpp s390x 4:15.2.0-4ubuntu1 [22.4 kB] 78s Get:14 http://ftpmaster.internal/ubuntu resolute/main s390x libcc1-0 s390x 15.2.0-7ubuntu1 [50.0 kB] 78s Get:15 http://ftpmaster.internal/ubuntu resolute/main s390x libgomp1 s390x 15.2.0-7ubuntu1 [154 kB] 78s Get:16 http://ftpmaster.internal/ubuntu resolute/main s390x libitm1 s390x 15.2.0-7ubuntu1 [30.9 kB] 78s Get:17 http://ftpmaster.internal/ubuntu resolute/main s390x libasan8 s390x 15.2.0-7ubuntu1 [2968 kB] 78s Get:18 http://ftpmaster.internal/ubuntu resolute/main s390x libubsan1 s390x 15.2.0-7ubuntu1 [1211 kB] 78s Get:19 http://ftpmaster.internal/ubuntu resolute/main s390x libgcc-15-dev s390x 15.2.0-7ubuntu1 [1045 kB] 78s Get:20 http://ftpmaster.internal/ubuntu resolute/main s390x gcc-15-s390x-linux-gnu s390x 15.2.0-7ubuntu1 [19.9 MB] 79s Get:21 http://ftpmaster.internal/ubuntu resolute/main s390x gcc-15 s390x 15.2.0-7ubuntu1 [513 kB] 79s Get:22 http://ftpmaster.internal/ubuntu resolute/main s390x gcc-s390x-linux-gnu s390x 4:15.2.0-4ubuntu1 [1208 B] 79s Get:23 http://ftpmaster.internal/ubuntu resolute/main s390x gcc s390x 4:15.2.0-4ubuntu1 [5018 B] 79s Get:24 http://ftpmaster.internal/ubuntu resolute/main s390x libstdc++-15-dev s390x 15.2.0-7ubuntu1 [2659 kB] 79s Get:25 http://ftpmaster.internal/ubuntu resolute/main s390x g++-15-s390x-linux-gnu s390x 15.2.0-7ubuntu1 [11.7 MB] 80s Get:26 http://ftpmaster.internal/ubuntu resolute/main s390x g++-15 s390x 15.2.0-7ubuntu1 [23.7 kB] 80s Get:27 http://ftpmaster.internal/ubuntu resolute/main s390x g++-s390x-linux-gnu s390x 4:15.2.0-4ubuntu1 [956 B] 80s Get:28 http://ftpmaster.internal/ubuntu resolute/main s390x g++ s390x 4:15.2.0-4ubuntu1 [1078 B] 80s Get:29 http://ftpmaster.internal/ubuntu resolute/main s390x build-essential s390x 12.12ubuntu1 [5090 B] 80s Get:30 http://ftpmaster.internal/ubuntu resolute/main s390x libdebhelper-perl all 13.24.2ubuntu1 [95.7 kB] 80s Get:31 http://ftpmaster.internal/ubuntu resolute/main s390x libtool all 2.5.4-7 [169 kB] 80s Get:32 http://ftpmaster.internal/ubuntu resolute/main s390x dh-autoreconf all 21 [12.5 kB] 80s Get:33 http://ftpmaster.internal/ubuntu resolute/main s390x libarchive-zip-perl all 1.68-1 [90.2 kB] 80s Get:34 http://ftpmaster.internal/ubuntu resolute/main s390x libfile-stripnondeterminism-perl all 1.15.0-1 [20.5 kB] 80s Get:35 http://ftpmaster.internal/ubuntu resolute/main s390x dh-strip-nondeterminism all 1.15.0-1 [5090 B] 80s Get:36 http://ftpmaster.internal/ubuntu resolute/main s390x debugedit s390x 1:5.2-3 [52.8 kB] 80s Get:37 http://ftpmaster.internal/ubuntu resolute/main s390x dwz s390x 0.16-2 [121 kB] 80s Get:38 http://ftpmaster.internal/ubuntu resolute/main s390x gettext s390x 0.23.2-1 [1062 kB] 80s Get:39 http://ftpmaster.internal/ubuntu resolute/main s390x intltool-debian all 0.35.0+20060710.6 [23.2 kB] 80s Get:40 http://ftpmaster.internal/ubuntu resolute/main s390x po-debconf all 1.0.21+nmu1 [233 kB] 80s Get:41 http://ftpmaster.internal/ubuntu resolute/main s390x debhelper all 13.24.2ubuntu1 [896 kB] 80s Get:42 http://ftpmaster.internal/ubuntu resolute/universe s390x dh-python all 6.20250414 [119 kB] 80s Get:43 http://ftpmaster.internal/ubuntu resolute/main s390x libpython3.14-stdlib s390x 3.14.0-4 [2373 kB] 80s Get:44 http://ftpmaster.internal/ubuntu resolute/universe s390x pybuild-plugin-autopkgtest all 6.20250414 [1746 B] 80s Get:45 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 80s Get:46 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-wheel all 0.46.1-2 [22.1 kB] 80s Get:47 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-build all 1.2.2-4 [31.0 kB] 80s Get:48 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 80s Get:49 http://ftpmaster.internal/ubuntu resolute/universe s390x pybuild-plugin-pyproject all 6.20250414 [1728 B] 80s Get:50 http://ftpmaster.internal/ubuntu resolute/main s390x python3.14 s390x 3.14.0-4 [805 kB] 80s Get:51 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x python3-all s390x 3.13.7-2 [892 B] 80s Get:52 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-astroid all 3.3.8-2 [175 kB] 80s Get:53 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-iniconfig all 2.1.0-1 [6840 B] 80s Get:54 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-lazy-object-proxy s390x 1.12.0-1 [26.9 kB] 80s Get:55 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pip all 25.1.1+dfsg-1ubuntu2 [1416 kB] 80s Get:56 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pluggy all 1.6.0-1 [21.0 kB] 80s Get:57 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pytest all 8.3.5-2 [252 kB] 80s Get:58 http://ftpmaster.internal/ubuntu resolute/universe s390x python3-pytest-runner all 2.11.1-5 [7592 B] 80s Get:59 http://ftpmaster.internal/ubuntu resolute/main s390x python3-wrapt s390x 1.17.3-2 [41.0 kB] 81s Fetched 64.6 MB in 7s (9328 kB/s) 81s Selecting previously unselected package libpython3.14-minimal:s390x. 81s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 61309 files and directories currently installed.) 81s Preparing to unpack .../00-libpython3.14-minimal_3.14.0-4_s390x.deb ... 81s Unpacking libpython3.14-minimal:s390x (3.14.0-4) ... 81s Selecting previously unselected package python3.14-minimal. 81s Preparing to unpack .../01-python3.14-minimal_3.14.0-4_s390x.deb ... 81s Unpacking python3.14-minimal (3.14.0-4) ... 81s Selecting previously unselected package m4. 81s Preparing to unpack .../02-m4_1.4.20-2_s390x.deb ... 81s Unpacking m4 (1.4.20-2) ... 81s Selecting previously unselected package autoconf. 81s Preparing to unpack .../03-autoconf_2.72-3.1ubuntu1_all.deb ... 81s Unpacking autoconf (2.72-3.1ubuntu1) ... 81s Selecting previously unselected package autotools-dev. 81s Preparing to unpack .../04-autotools-dev_20240727.1_all.deb ... 81s Unpacking autotools-dev (20240727.1) ... 81s Selecting previously unselected package automake. 81s Preparing to unpack .../05-automake_1%3a1.18.1-2_all.deb ... 81s Unpacking automake (1:1.18.1-2) ... 81s Selecting previously unselected package autopoint. 81s Preparing to unpack .../06-autopoint_0.23.2-1_all.deb ... 81s Unpacking autopoint (0.23.2-1) ... 81s Selecting previously unselected package libisl23:s390x. 81s Preparing to unpack .../07-libisl23_0.27-1_s390x.deb ... 81s Unpacking libisl23:s390x (0.27-1) ... 81s Selecting previously unselected package libmpc3:s390x. 81s Preparing to unpack .../08-libmpc3_1.3.1-2_s390x.deb ... 81s Unpacking libmpc3:s390x (1.3.1-2) ... 81s Selecting previously unselected package cpp-15-s390x-linux-gnu. 81s Preparing to unpack .../09-cpp-15-s390x-linux-gnu_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking cpp-15-s390x-linux-gnu (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package cpp-15. 81s Preparing to unpack .../10-cpp-15_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking cpp-15 (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package cpp-s390x-linux-gnu. 81s Preparing to unpack .../11-cpp-s390x-linux-gnu_4%3a15.2.0-4ubuntu1_s390x.deb ... 81s Unpacking cpp-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 81s Selecting previously unselected package cpp. 81s Preparing to unpack .../12-cpp_4%3a15.2.0-4ubuntu1_s390x.deb ... 81s Unpacking cpp (4:15.2.0-4ubuntu1) ... 81s Selecting previously unselected package libcc1-0:s390x. 81s Preparing to unpack .../13-libcc1-0_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking libcc1-0:s390x (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package libgomp1:s390x. 81s Preparing to unpack .../14-libgomp1_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking libgomp1:s390x (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package libitm1:s390x. 81s Preparing to unpack .../15-libitm1_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking libitm1:s390x (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package libasan8:s390x. 81s Preparing to unpack .../16-libasan8_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking libasan8:s390x (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package libubsan1:s390x. 81s Preparing to unpack .../17-libubsan1_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking libubsan1:s390x (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package libgcc-15-dev:s390x. 81s Preparing to unpack .../18-libgcc-15-dev_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking libgcc-15-dev:s390x (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package gcc-15-s390x-linux-gnu. 81s Preparing to unpack .../19-gcc-15-s390x-linux-gnu_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking gcc-15-s390x-linux-gnu (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package gcc-15. 81s Preparing to unpack .../20-gcc-15_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking gcc-15 (15.2.0-7ubuntu1) ... 81s Selecting previously unselected package gcc-s390x-linux-gnu. 81s Preparing to unpack .../21-gcc-s390x-linux-gnu_4%3a15.2.0-4ubuntu1_s390x.deb ... 81s Unpacking gcc-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 81s Selecting previously unselected package gcc. 81s Preparing to unpack .../22-gcc_4%3a15.2.0-4ubuntu1_s390x.deb ... 81s Unpacking gcc (4:15.2.0-4ubuntu1) ... 81s Selecting previously unselected package libstdc++-15-dev:s390x. 81s Preparing to unpack .../23-libstdc++-15-dev_15.2.0-7ubuntu1_s390x.deb ... 81s Unpacking libstdc++-15-dev:s390x (15.2.0-7ubuntu1) ... 82s Selecting previously unselected package g++-15-s390x-linux-gnu. 82s Preparing to unpack .../24-g++-15-s390x-linux-gnu_15.2.0-7ubuntu1_s390x.deb ... 82s Unpacking g++-15-s390x-linux-gnu (15.2.0-7ubuntu1) ... 82s Selecting previously unselected package g++-15. 82s Preparing to unpack .../25-g++-15_15.2.0-7ubuntu1_s390x.deb ... 82s Unpacking g++-15 (15.2.0-7ubuntu1) ... 82s Selecting previously unselected package g++-s390x-linux-gnu. 82s Preparing to unpack .../26-g++-s390x-linux-gnu_4%3a15.2.0-4ubuntu1_s390x.deb ... 82s Unpacking g++-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 82s Selecting previously unselected package g++. 82s Preparing to unpack .../27-g++_4%3a15.2.0-4ubuntu1_s390x.deb ... 82s Unpacking g++ (4:15.2.0-4ubuntu1) ... 82s Selecting previously unselected package build-essential. 82s Preparing to unpack .../28-build-essential_12.12ubuntu1_s390x.deb ... 82s Unpacking build-essential (12.12ubuntu1) ... 82s Selecting previously unselected package libdebhelper-perl. 82s Preparing to unpack .../29-libdebhelper-perl_13.24.2ubuntu1_all.deb ... 82s Unpacking libdebhelper-perl (13.24.2ubuntu1) ... 82s Selecting previously unselected package libtool. 82s Preparing to unpack .../30-libtool_2.5.4-7_all.deb ... 82s Unpacking libtool (2.5.4-7) ... 82s Selecting previously unselected package dh-autoreconf. 82s Preparing to unpack .../31-dh-autoreconf_21_all.deb ... 82s Unpacking dh-autoreconf (21) ... 82s Selecting previously unselected package libarchive-zip-perl. 82s Preparing to unpack .../32-libarchive-zip-perl_1.68-1_all.deb ... 82s Unpacking libarchive-zip-perl (1.68-1) ... 82s Selecting previously unselected package libfile-stripnondeterminism-perl. 82s Preparing to unpack .../33-libfile-stripnondeterminism-perl_1.15.0-1_all.deb ... 82s Unpacking libfile-stripnondeterminism-perl (1.15.0-1) ... 82s Selecting previously unselected package dh-strip-nondeterminism. 82s Preparing to unpack .../34-dh-strip-nondeterminism_1.15.0-1_all.deb ... 82s Unpacking dh-strip-nondeterminism (1.15.0-1) ... 82s Selecting previously unselected package debugedit. 82s Preparing to unpack .../35-debugedit_1%3a5.2-3_s390x.deb ... 82s Unpacking debugedit (1:5.2-3) ... 82s Selecting previously unselected package dwz. 82s Preparing to unpack .../36-dwz_0.16-2_s390x.deb ... 82s Unpacking dwz (0.16-2) ... 82s Selecting previously unselected package gettext. 82s Preparing to unpack .../37-gettext_0.23.2-1_s390x.deb ... 82s Unpacking gettext (0.23.2-1) ... 82s Selecting previously unselected package intltool-debian. 82s Preparing to unpack .../38-intltool-debian_0.35.0+20060710.6_all.deb ... 82s Unpacking intltool-debian (0.35.0+20060710.6) ... 82s Selecting previously unselected package po-debconf. 82s Preparing to unpack .../39-po-debconf_1.0.21+nmu1_all.deb ... 82s Unpacking po-debconf (1.0.21+nmu1) ... 82s Selecting previously unselected package debhelper. 82s Preparing to unpack .../40-debhelper_13.24.2ubuntu1_all.deb ... 82s Unpacking debhelper (13.24.2ubuntu1) ... 82s Selecting previously unselected package dh-python. 82s Preparing to unpack .../41-dh-python_6.20250414_all.deb ... 82s Unpacking dh-python (6.20250414) ... 82s Selecting previously unselected package libpython3.14-stdlib:s390x. 82s Preparing to unpack .../42-libpython3.14-stdlib_3.14.0-4_s390x.deb ... 82s Unpacking libpython3.14-stdlib:s390x (3.14.0-4) ... 82s Selecting previously unselected package pybuild-plugin-autopkgtest. 82s Preparing to unpack .../43-pybuild-plugin-autopkgtest_6.20250414_all.deb ... 82s Unpacking pybuild-plugin-autopkgtest (6.20250414) ... 82s Selecting previously unselected package python3-pyproject-hooks. 82s Preparing to unpack .../44-python3-pyproject-hooks_1.2.0-1_all.deb ... 82s Unpacking python3-pyproject-hooks (1.2.0-1) ... 82s Selecting previously unselected package python3-wheel. 82s Preparing to unpack .../45-python3-wheel_0.46.1-2_all.deb ... 82s Unpacking python3-wheel (0.46.1-2) ... 82s Selecting previously unselected package python3-build. 82s Preparing to unpack .../46-python3-build_1.2.2-4_all.deb ... 82s Unpacking python3-build (1.2.2-4) ... 82s Selecting previously unselected package python3-installer. 82s Preparing to unpack .../47-python3-installer_0.7.0+dfsg1-3_all.deb ... 82s Unpacking python3-installer (0.7.0+dfsg1-3) ... 82s Selecting previously unselected package pybuild-plugin-pyproject. 82s Preparing to unpack .../48-pybuild-plugin-pyproject_6.20250414_all.deb ... 82s Unpacking pybuild-plugin-pyproject (6.20250414) ... 82s Selecting previously unselected package python3.14. 82s Preparing to unpack .../49-python3.14_3.14.0-4_s390x.deb ... 82s Unpacking python3.14 (3.14.0-4) ... 82s Selecting previously unselected package python3-all. 82s Preparing to unpack .../50-python3-all_3.13.7-2_s390x.deb ... 82s Unpacking python3-all (3.13.7-2) ... 82s Selecting previously unselected package python3-astroid. 82s Preparing to unpack .../51-python3-astroid_3.3.8-2_all.deb ... 82s Unpacking python3-astroid (3.3.8-2) ... 82s Selecting previously unselected package python3-iniconfig. 82s Preparing to unpack .../52-python3-iniconfig_2.1.0-1_all.deb ... 82s Unpacking python3-iniconfig (2.1.0-1) ... 82s Selecting previously unselected package python3-lazy-object-proxy. 82s Preparing to unpack .../53-python3-lazy-object-proxy_1.12.0-1_s390x.deb ... 82s Unpacking python3-lazy-object-proxy (1.12.0-1) ... 82s Selecting previously unselected package python3-pip. 82s Preparing to unpack .../54-python3-pip_25.1.1+dfsg-1ubuntu2_all.deb ... 82s Unpacking python3-pip (25.1.1+dfsg-1ubuntu2) ... 82s Selecting previously unselected package python3-pluggy. 82s Preparing to unpack .../55-python3-pluggy_1.6.0-1_all.deb ... 82s Unpacking python3-pluggy (1.6.0-1) ... 82s Selecting previously unselected package python3-pytest. 82s Preparing to unpack .../56-python3-pytest_8.3.5-2_all.deb ... 82s Unpacking python3-pytest (8.3.5-2) ... 82s Selecting previously unselected package python3-pytest-runner. 82s Preparing to unpack .../57-python3-pytest-runner_2.11.1-5_all.deb ... 82s Unpacking python3-pytest-runner (2.11.1-5) ... 82s Selecting previously unselected package python3-wrapt. 82s Preparing to unpack .../58-python3-wrapt_1.17.3-2_s390x.deb ... 82s Unpacking python3-wrapt (1.17.3-2) ... 82s Setting up dh-python (6.20250414) ... 82s Setting up python3-iniconfig (2.1.0-1) ... 83s Setting up libarchive-zip-perl (1.68-1) ... 83s Setting up libdebhelper-perl (13.24.2ubuntu1) ... 83s Setting up libpython3.14-minimal:s390x (3.14.0-4) ... 83s Setting up m4 (1.4.20-2) ... 83s Setting up libgomp1:s390x (15.2.0-7ubuntu1) ... 83s Setting up python3-wheel (0.46.1-2) ... 83s Setting up autotools-dev (20240727.1) ... 83s Setting up python3-pyproject-hooks (1.2.0-1) ... 83s Setting up libmpc3:s390x (1.3.1-2) ... 83s Setting up python3-wrapt (1.17.3-2) ... 83s Setting up autopoint (0.23.2-1) ... 83s Setting up python3-pip (25.1.1+dfsg-1ubuntu2) ... 84s Setting up python3-installer (0.7.0+dfsg1-3) ... 85s Setting up autoconf (2.72-3.1ubuntu1) ... 85s Setting up python3-pluggy (1.6.0-1) ... 85s Setting up libubsan1:s390x (15.2.0-7ubuntu1) ... 85s Setting up dwz (0.16-2) ... 85s Setting up python3-astroid (3.3.8-2) ... 85s Setting up libasan8:s390x (15.2.0-7ubuntu1) ... 85s Setting up debugedit (1:5.2-3) ... 85s Setting up python3-pytest-runner (2.11.1-5) ... 85s Setting up python3-lazy-object-proxy (1.12.0-1) ... 85s Setting up libisl23:s390x (0.27-1) ... 85s Setting up python3-build (1.2.2-4) ... 85s Setting up python3.14-minimal (3.14.0-4) ... 86s Setting up libcc1-0:s390x (15.2.0-7ubuntu1) ... 86s Setting up libitm1:s390x (15.2.0-7ubuntu1) ... 86s Setting up automake (1:1.18.1-2) ... 86s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 86s Setting up libfile-stripnondeterminism-perl (1.15.0-1) ... 86s Setting up gettext (0.23.2-1) ... 86s Setting up libgcc-15-dev:s390x (15.2.0-7ubuntu1) ... 86s Setting up libpython3.14-stdlib:s390x (3.14.0-4) ... 86s Setting up pybuild-plugin-pyproject (6.20250414) ... 86s Setting up python3-pytest (8.3.5-2) ... 87s Setting up intltool-debian (0.35.0+20060710.6) ... 87s Setting up libstdc++-15-dev:s390x (15.2.0-7ubuntu1) ... 87s Setting up dh-strip-nondeterminism (1.15.0-1) ... 87s Setting up cpp-15-s390x-linux-gnu (15.2.0-7ubuntu1) ... 87s Setting up python3.14 (3.14.0-4) ... 87s Setting up gcc-15-s390x-linux-gnu (15.2.0-7ubuntu1) ... 87s Setting up g++-15-s390x-linux-gnu (15.2.0-7ubuntu1) ... 87s Setting up cpp-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 87s Setting up po-debconf (1.0.21+nmu1) ... 87s Setting up python3-all (3.13.7-2) ... 87s Setting up gcc-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 87s Setting up cpp-15 (15.2.0-7ubuntu1) ... 87s Setting up cpp (4:15.2.0-4ubuntu1) ... 87s Setting up g++-s390x-linux-gnu (4:15.2.0-4ubuntu1) ... 87s Setting up gcc-15 (15.2.0-7ubuntu1) ... 87s Setting up g++-15 (15.2.0-7ubuntu1) ... 87s Setting up libtool (2.5.4-7) ... 87s Setting up gcc (4:15.2.0-4ubuntu1) ... 87s Setting up dh-autoreconf (21) ... 87s Setting up g++ (4:15.2.0-4ubuntu1) ... 87s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 87s Setting up build-essential (12.12ubuntu1) ... 87s Setting up debhelper (13.24.2ubuntu1) ... 87s Setting up pybuild-plugin-autopkgtest (6.20250414) ... 87s Processing triggers for man-db (2.13.1-1) ... 88s Processing triggers for install-info (7.2-5) ... 88s Processing triggers for libc-bin (2.42-2ubuntu2) ... 88s Processing triggers for systemd (257.9-0ubuntu2) ... 89s autopkgtest [12:17:58]: test pybuild-autopkgtest: pybuild-autopkgtest 89s autopkgtest [12:17:58]: test pybuild-autopkgtest: [----------------------- 89s pybuild-autopkgtest 89s I: pybuild base:311: cd /tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build; python3.14 -m pytest tests 91s ============================= test session starts ============================== 91s platform linux -- Python 3.14.0, pytest-8.3.5, pluggy-1.6.0 91s rootdir: /tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build 91s configfile: pyproject.toml 91s plugins: typeguard-4.4.2 91s collected 1708 items 91s 91s tests/brain/numpy/test_core_einsumfunc.py ss [ 0%] 91s tests/brain/numpy/test_core_fromnumeric.py s [ 0%] 91s tests/brain/numpy/test_core_function_base.py s [ 0%] 91s tests/brain/numpy/test_core_multiarray.py sssss [ 0%] 91s tests/brain/numpy/test_core_numeric.py sssss [ 0%] 91s tests/brain/numpy/test_core_numerictypes.py sssssss.. [ 1%] 92s tests/brain/numpy/test_core_umath.py ssssssss [ 1%] 92s tests/brain/numpy/test_ma.py ssss [ 2%] 92s tests/brain/numpy/test_ndarray.py sss [ 2%] 92s tests/brain/numpy/test_random_mtrand.py ss [ 2%] 92s tests/brain/test_argparse.py . [ 2%] 92s tests/brain/test_attr.py ....... [ 2%] 93s tests/brain/test_brain.py ......s.....ss......F......................... [ 5%] 93s ..........F.s.........................................................x. [ 9%] 93s ..............s...... [ 10%] 93s tests/brain/test_builtin.py .................. [ 12%] 93s tests/brain/test_ctypes.py ....x........................ [ 13%] 93s tests/brain/test_dataclasses.py ........................................ [ 16%] 93s ......................................x... [ 18%] 93s tests/brain/test_dateutil.py . [ 18%] 94s tests/brain/test_enum.py ............................. [ 20%] 94s tests/brain/test_hashlib.py ... [ 20%] 94s tests/brain/test_multiprocessing.py ... [ 20%] 94s tests/brain/test_named_tuple.py ....................... [ 21%] 94s tests/brain/test_nose.py s [ 22%] 94s tests/brain/test_pathlib.py FF.. [ 22%] 94s tests/brain/test_pytest.py . [ 22%] 94s tests/brain/test_qt.py sss [ 22%] 94s tests/brain/test_regex.py ss [ 22%] 94s tests/brain/test_signal.py ... [ 22%] 95s tests/brain/test_six.py ....... [ 23%] 95s tests/brain/test_ssl.py .. [ 23%] 95s tests/brain/test_threading.py .... [ 23%] 95s tests/brain/test_typing.py ..... [ 23%] 95s tests/brain/test_typing_extensions.py . [ 23%] 95s tests/brain/test_unittest.py . [ 23%] 96s tests/test_builder.py ...........................................FFFFFFF [ 26%] 96s FFFF.... [ 27%] 97s tests/test_constraint.py ................................... [ 29%] 97s tests/test_decorators.py ... [ 29%] 97s tests/test_filter_statements.py . [ 29%] 97s tests/test_group_exceptions.py ... [ 29%] 97s tests/test_helpers.py ............... [ 30%] 97s tests/test_inference.py ............................................F... [ 33%] 97s ............................................x...........x......x........ [ 37%] 97s ..................................................x..................... [ 41%] 98s ........................................................................ [ 46%] 98s ................................................x........xx............. [ 50%] 98s ........x...x................................................x.......... [ 54%] 98s ................................. [ 56%] 98s tests/test_inference_calls.py ........................ [ 57%] 99s tests/test_lookup.py FFFFFFFFFFFFFFFFFFFFFFFFFFFF....................... [ 60%] 99s .... [ 61%] 108s tests/test_manager.py .....................................s....... [ 63%] 109s tests/test_modutils.py ................................................. [ 66%] 109s ................s. [ 67%] 109s tests/test_nodes.py ............F................FFFFFFFFF.............. [ 70%] 109s ........................................................................ [ 74%] 109s ................................................................ [ 78%] 109s tests/test_nodes_lineno.py ....................... [ 80%] 109s tests/test_nodes_position.py ... [ 80%] 110s tests/test_object_model.py x...............x.........s........... [ 82%] 110s tests/test_objects.py ...................... [ 83%] 110s tests/test_protocols.py ..................... [ 84%] 110s tests/test_python3.py .......................... [ 86%] 110s tests/test_raw_building.py ............. [ 87%] 113s tests/test_regrtest.py .............ss............ [ 88%] 115s tests/test_scoped_nodes.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 91%] 118s FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 95%] 121s FFFFFFFFFFFFFFFF...............................E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build; python3.14 -m pytest tests 121s I: pybuild base:311: cd /tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build; python3.13 -m pytest tests 121s ... [ 98%] 121s tests/test_stdlib.py .. [ 98%] 121s tests/test_transforms.py ......... [ 99%] 121s tests/test_type_params.py ..... [ 99%] 121s tests/test_utils.py ........ [100%] 121s 121s =================================== FAILURES =================================== 121s _______________________ TypingBrain.test_has_dunder_args _______________________ 121s 121s self = 121s 121s def test_has_dunder_args(self) -> None: 121s ast_node = builder.extract_node( 121s """ 121s from typing import Union 121s NumericTypes = Union[int, float] 121s NumericTypes.__args__ #@ 121s """ 121s ) 121s inferred = next(ast_node.infer()) 121s > assert isinstance(inferred, nodes.Tuple) 121s E AssertionError: assert False 121s E + where False = isinstance(Uninferable, ) 121s E + where = nodes.Tuple 121s 121s tests/brain/test_brain.py:747: AssertionError 121s ________________________ TypingBrain.test_typing_types _________________________ 121s 121s self = 121s 121s def test_typing_types(self) -> None: 121s ast_nodes = builder.extract_node( 121s """ 121s from typing import TypeVar, Iterable, Tuple, NewType, Dict, Union 121s TypeVar('MyTypeVar', int, float, complex) #@ 121s Iterable[Tuple[MyTypeVar, MyTypeVar]] #@ 121s TypeVar('AnyStr', str, bytes) #@ 121s NewType('UserId', str) #@ 121s Dict[str, str] #@ 121s Union[int, str] #@ 121s """ 121s ) 121s for node in ast_nodes: 121s inferred = next(node.infer()) 121s > self.assertIsInstance(inferred, nodes.ClassDef, node.as_string()) 121s E AssertionError: Uninferable is not an instance of : Union[int, str] 121s 121s tests/brain/test_brain.py:561: AssertionError 121s ____________________________ test_inference_parents ____________________________ 121s 121s def test_inference_parents() -> None: 121s """Test inference of ``pathlib.Path.parents``.""" 121s name_node = astroid.extract_node( 121s """ 121s from pathlib import Path 121s 121s current_path = Path().resolve() 121s path_parents = current_path.parents 121s path_parents 121s """ 121s ) 121s inferred = name_node.inferred() 121s assert len(inferred) == 1 121s assert isinstance(inferred[0], bases.Instance) 121s if PY313_PLUS: 121s > assert inferred[0].qname() == "builtins.tuple" 121s E AssertionError: assert 'pathlib._PathParents' == 'builtins.tuple' 121s E 121s E - builtins.tuple 121s E + pathlib._PathParents 121s 121s tests/brain/test_pathlib.py:27: AssertionError 121s ____________________ test_inference_parents_subscript_index ____________________ 121s 121s def test_inference_parents_subscript_index() -> None: 121s """Test inference of ``pathlib.Path.parents``, accessed by index.""" 121s path = astroid.extract_node( 121s """ 121s from pathlib import Path 121s 121s current_path = Path().resolve() 121s current_path.parents[2] #@ 121s """ 121s ) 121s 121s inferred = path.inferred() 121s assert len(inferred) == 1 121s assert isinstance(inferred[0], bases.Instance) 121s if PY313_PLUS: 121s > assert inferred[0].qname() == "pathlib._local.Path" 121s E AssertionError: assert 'builtins.tuple' == 'pathlib._local.Path' 121s E 121s E - pathlib._local.Path 121s E + builtins.tuple 121s 121s tests/brain/test_pathlib.py:47: AssertionError 121s _____________________ FileBuildTest.test_class_base_props ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ FileBuildTest.test_class_basenames ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ FileBuildTest.test_class_instance_attrs ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ FileBuildTest.test_class_locals ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ FileBuildTest.test_function_base_props ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ FileBuildTest.test_function_locals ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ FileBuildTest.test_method_base_props _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ FileBuildTest.test_method_locals _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ FileBuildTest.test_module_base_props _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ FileBuildTest.test_module_locals _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ FileBuildTest.test_unknown_encoding ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_builder.py:752: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ InferenceTest.test_binary_op_or_union_type __________________ 121s 121s self = 121s 121s def test_binary_op_or_union_type(self) -> None: 121s """Binary or union is only defined for Python 3.10+.""" 121s code = """ 121s class A: ... 121s 121s int | 2 #@ 121s int | "Hello" #@ 121s int | ... #@ 121s int | A() #@ 121s int | None | 2 #@ 121s """ 121s ast_nodes = extract_node(code) 121s for n in ast_nodes: 121s assert n.inferred() == [util.Uninferable] 121s 121s code = """ 121s from typing import List 121s 121s class A: ... 121s class B: ... 121s 121s int | None #@ 121s int | str #@ 121s int | str | None #@ 121s A | B #@ 121s A | None #@ 121s List[int] | int #@ 121s tuple | int #@ 121s """ 121s ast_nodes = extract_node(code) 121s if not PY310_PLUS: 121s for n in ast_nodes: 121s assert n.inferred() == [util.Uninferable] 121s else: 121s i0 = ast_nodes[0].inferred()[0] 121s assert isinstance(i0, UnionType) 121s assert isinstance(i0.left, nodes.ClassDef) 121s assert i0.left.name == "int" 121s assert isinstance(i0.right, nodes.Const) 121s assert i0.right.value is None 121s 121s # Assert basic UnionType properties and methods 121s assert i0.callable() is False 121s assert i0.bool_value() is True 121s assert i0.pytype() == "types.UnionType" 121s assert i0.display_type() == "UnionType" 121s > assert str(i0) == "UnionType(UnionType)" 121s E AssertionError: assert 'UnionType(Union)' == 'UnionType(UnionType)' 121s E 121s E - UnionType(UnionType) 121s E ? ---- 121s E + UnionType(Union) 121s 121s tests/test_inference.py:1309: AssertionError 121s ________________________ LookupTest.test_builtin_lookup ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________________ LookupTest.test_class _____________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ LookupTest.test_class_ancestor_name ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ LookupTest.test_class_in_function _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ LookupTest.test_class_variables ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ LookupTest.test_decorator_arguments_lookup __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ LookupTest.test_dict_comp_nested _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________________ LookupTest.test_dict_comps __________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ LookupTest.test_explicit___name__ _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ LookupTest.test_function_argument_with_default ________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ LookupTest.test_function_module_special ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ LookupTest.test_function_nested ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ LookupTest.test_generator_attributes _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ LookupTest.test_global_delete _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ LookupTest.test_inner_classes _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ LookupTest.test_inner_decorator_member_lookup _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ LookupTest.test_lambda_nested _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________________ LookupTest.test_limit _____________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ LookupTest.test_list_comp_nested _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ LookupTest.test_list_comp_target _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________________ LookupTest.test_list_comps __________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ LookupTest.test_loopvar_hiding ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________________ LookupTest.test_method ____________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________________ LookupTest.test_module ____________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ LookupTest.test_set_comp_closure _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ LookupTest.test_set_comp_nested ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________________ LookupTest.test_set_comps ___________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ LookupTest.test_static_method_lookup _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_lookup.py:22: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ AsStringTest.test_module_as_string ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def test_module_as_string(self) -> None: 121s """Check as_string on a whole module prepared to be returned identically.""" 121s > module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:114: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ ImportNodeTest.test_absolute_import ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:481: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ ImportNodeTest.test_as_string _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:481: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ImportNodeTest.test_bad_import_inference ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:481: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ImportNodeTest.test_conditional ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:481: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ImportNodeTest.test_conditional_import ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:481: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ImportNodeTest.test_from_self_resolve _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:481: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ImportNodeTest.test_import_self_resolve ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:481: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ImportNodeTest.test_more_absolute_import ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:481: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ ImportNodeTest.test_real_name _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_nodes.py:481: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ModuleNodeTest.test_comment_before_docstring _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ ModuleNodeTest.test_dict_interface ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ ModuleNodeTest.test_file_stream_api ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ ModuleNodeTest.test_file_stream_in_memory ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ModuleNodeTest.test_file_stream_physical ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________________ ModuleNodeTest.test_getattr __________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________________ ModuleNodeTest.test_import_1 _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________________ ModuleNodeTest.test_import_2 _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ ModuleNodeTest.test_import_unavailable_module _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ ModuleNodeTest.test_module_getattr ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ModuleNodeTest.test_multiline_docstring ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ModuleNodeTest.test_public_names _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ ModuleNodeTest.test_relative_to_absolute_name _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________ ModuleNodeTest.test_relative_to_absolute_name_beyond_top_level ________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ModuleNodeTest.test_singleline_docstring ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ModuleNodeTest.test_special_attributes ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ ModuleNodeTest.test_stream_api ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ ModuleNodeTest.test_wildcard_import_names ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ModuleNodeTest.test_without_docstring _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________ FunctionNodeTest.test_abstract_methods_are_not_implicitly_none ________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ FunctionNodeTest.test_argnames ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ FunctionNodeTest.test_argnames_lambda _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________ FunctionNodeTest.test_decorator_builtin_descriptors ______________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ FunctionNodeTest.test_default_value ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ FunctionNodeTest.test_dict_interface _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ FunctionNodeTest.test_display_type ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ FunctionNodeTest.test_docstring_special_cases _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________ FunctionNodeTest.test_dunder_class_local_to_classmethod ____________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________ FunctionNodeTest.test_dunder_class_local_to_function _____________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________ FunctionNodeTest.test_dunder_class_local_to_method ______________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ FunctionNodeTest.test_format_args _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________ FunctionNodeTest.test_format_args_keyword_only_args ______________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ FunctionNodeTest.test_four_args ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ FunctionNodeTest.test_func_instance_attr ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ FunctionNodeTest.test_func_is_bound ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ FunctionNodeTest.test_igetattr ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ FunctionNodeTest.test_inference_error _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ FunctionNodeTest.test_is_abstract _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ FunctionNodeTest.test_is_abstract_decorated __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ FunctionNodeTest.test_is_generator ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ FunctionNodeTest.test_is_method ________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ FunctionNodeTest.test_lambda_getattr _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ FunctionNodeTest.test_lambda_pytype ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ FunctionNodeTest.test_lambda_qname ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ FunctionNodeTest.test_method_init_subclass __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ FunctionNodeTest.test_multiline_docstring ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________ FunctionNodeTest.test_multiline_docstring_async ________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ FunctionNodeTest.test_navigation _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________ FunctionNodeTest.test_no_returns_is_implicitly_none ______________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________ FunctionNodeTest.test_only_raises_is_not_implicitly_none ___________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ FunctionNodeTest.test_positional_only_argnames ________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________ FunctionNodeTest.test_return_annotation_is_not_the_last ____________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ FunctionNodeTest.test_return_nothing _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ FunctionNodeTest.test_singleline_docstring __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ FunctionNodeTest.test_special_attributes ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________ FunctionNodeTest.test_type_builtin_descriptor_subclasses ___________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ FunctionNodeTest.test_without_docstring ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ ClassNodeTest.test__bases__attribute _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ ClassNodeTest.test__mro__attribute ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_add_metaclass _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ClassNodeTest.test_all_ancestors_need_slots __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________________ ClassNodeTest.test_ancestors _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ ClassNodeTest.test_class_extra_decorators ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________ ClassNodeTest.test_class_extra_decorators_frame_is_not_class _________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _ ClassNodeTest.test_class_extra_decorators_only_assignment_names_are_considered _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____ ClassNodeTest.test_class_extra_decorators_only_callfunc_are_considered ____ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____ ClassNodeTest.test_class_extra_decorators_only_same_name_considered ______ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_class_getattr _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ ClassNodeTest.test_class_keywords _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ ClassNodeTest.test_classmethod_attributes ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ClassNodeTest.test_cls_special_attributes_1 __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ClassNodeTest.test_cls_special_attributes_2 __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ ClassNodeTest.test_dict_interface _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ ClassNodeTest.test_duplicate_bases_namedtuple _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______ ClassNodeTest.test_extra_decorators_only_class_level_assignments _______ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________ ClassNodeTest.test_function_with_decorator_lineno _______________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________ ClassNodeTest.test_generator_from_infer_call_result_parent __________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ClassNodeTest.test_getattr_from_grandpa ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ClassNodeTest.test_getattr_method_transform __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________ ClassNodeTest.test_getattr_with_enpty_annassign ________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ClassNodeTest.test_has_dynamic_getattr ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ClassNodeTest.test_implicit_metaclass _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ClassNodeTest.test_implicit_metaclass_lookup _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_inner_classes _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ ClassNodeTest.test_instance_attr_ancestors __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________ ClassNodeTest.test_instance_bound_method_lambdas _______________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________ ClassNodeTest.test_instance_bound_method_lambdas_2 ______________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ ClassNodeTest.test_instance_getattr ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________ ClassNodeTest.test_instance_getattr_with_class_attr ______________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ ClassNodeTest.test_instance_special_attributes ________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ ClassNodeTest.test_kite_graph _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ClassNodeTest.test_local_attr_ancestors ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ ClassNodeTest.test_local_attr_invalid_mro ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ ClassNodeTest.test_local_attr_mro _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ ClassNodeTest.test_metaclass_error ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ClassNodeTest.test_metaclass_generator_hack __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________ ClassNodeTest.test_metaclass_generator_hack_enum_base _____________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ ClassNodeTest.test_metaclass_lookup ______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________ ClassNodeTest.test_metaclass_lookup_inference_errors _____________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________ ClassNodeTest.test_metaclass_lookup_using_same_class _____________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ______________________ ClassNodeTest.test_metaclass_type _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ClassNodeTest.test_metaclass_yes_leak _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________________ ClassNodeTest.test_methods __________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________________ ClassNodeTest.test_mro ____________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_mro_generic_1 _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_mro_generic_2 _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_mro_generic_3 _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_mro_generic_4 _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_mro_generic_5 _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_mro_generic_6 _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _______________________ ClassNodeTest.test_mro_generic_7 _______________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ClassNodeTest.test_mro_generic_error_1 ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ClassNodeTest.test_mro_generic_error_2 ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ClassNodeTest.test_mro_typing_extensions ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ ClassNodeTest.test_mro_with_attribute_classes _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ClassNodeTest.test_mro_with_factories _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ClassNodeTest.test_multiline_docstring ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________________ ClassNodeTest.test_navigation _________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ________________ ClassNodeTest.test_no_infinite_metaclass_loop _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________ ClassNodeTest.test_no_infinite_metaclass_loop_with_redefine __________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ClassNodeTest.test_nonregr_infer_callresult __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ClassNodeTest.test_singleline_docstring ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________________ ClassNodeTest.test_slots ___________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________ ClassNodeTest.test_slots_added_dynamically_still_inferred ___________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ClassNodeTest.test_slots_empty_list_of_slots _________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ClassNodeTest.test_slots_for_dict_keys ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _________________ ClassNodeTest.test_slots_taken_from_parents __________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________________ ClassNodeTest.test_type ____________________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________________ ClassNodeTest.test_type_three_arguments ____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ___________ ClassNodeTest.test_using_invalid_six_add_metaclass_call ____________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s __________________ ClassNodeTest.test_with_invalid_metaclass ___________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s ____________________ ClassNodeTest.test_with_metaclass_mro _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s _____________________ ClassNodeTest.test_without_docstring _____________________ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s > node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:181: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s /usr/lib/python3/dist-packages/astroid/builder.py:477: in _parse_string 121s parsed = parser_module.parse( 121s /usr/lib/python3/dist-packages/astroid/_ast.py:29: in parse 121s return ast.parse(string, filename=filename, type_comments=type_comments) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s source = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n\n' 121s filename = 'data.module', mode = 'exec' 121s 121s def parse(source, filename='', mode='exec', *, 121s type_comments=False, feature_version=None, optimize=-1): 121s """ 121s Parse the source into an AST node. 121s Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). 121s Pass type_comments=True to get back type comments where the syntax allows. 121s """ 121s flags = PyCF_ONLY_AST 121s if optimize > 0: 121s flags |= PyCF_OPTIMIZED_AST 121s if type_comments: 121s flags |= PyCF_TYPE_COMMENTS 121s if feature_version is None: 121s feature_version = -1 121s elif isinstance(feature_version, tuple): 121s major, minor = feature_version # Should be a 2-tuple. 121s if major != 3: 121s raise ValueError(f"Unsupported major version: {major}") 121s feature_version = minor 121s # Else it should be an int giving the minor version for 3.x. 121s > return compile(source, filename, mode, flags, 121s _feature_version=feature_version, optimize=optimize) 121s E File "data.module", line 62 121s E SyntaxError: 'return' in a 'finally' block 121s 121s /usr/lib/python3.14/ast.py:46: SyntaxError 121s 121s The above exception was the direct cause of the following exception: 121s 121s self = 121s 121s def setUp(self) -> None: 121s super().setUp() 121s > self.module = resources.build_file("data/module.py", "data.module") 121s 121s tests/test_scoped_nodes.py:73: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s tests/resources.py:23: in build_file 121s return builder.AstroidBuilder().file_build(find(path), modname) 121s /usr/lib/python3/dist-packages/astroid/builder.py:144: in file_build 121s module, builder = self._data_build(data, modname, path) 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s self = 121s data = '"""test module for astroid\n"""\n\n__revision__ = \'$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $\'\nfrom astroi...= a and (b or c)\n else:\n c = a and b or d\n list(map(lambda x, y: (y, x), a))\nredirect = four_args\n\n' 121s modname = 'data.module' 121s path = '/tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build/tests/testdata/python3/data/module.py' 121s 121s def _data_build( 121s self, data: str, modname: str, path: str | None 121s ) -> tuple[nodes.Module, rebuilder.TreeRebuilder]: 121s """Build tree node from data and add some informations.""" 121s try: 121s node, parser_module = _parse_string( 121s data, type_comments=True, modname=modname 121s ) 121s except (TypeError, ValueError, SyntaxError) as exc: 121s > raise AstroidSyntaxError( 121s "Parsing Python code failed:\n{error}", 121s source=data, 121s modname=modname, 121s path=path, 121s error=exc, 121s ) from exc 121s E astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: 121s E 'return' in a 'finally' block (data.module, line 62) 121s 121s /usr/lib/python3/dist-packages/astroid/builder.py:185: AstroidSyntaxError 121s =========================== short test summary info ============================ 121s FAILED tests/brain/test_brain.py::TypingBrain::test_has_dunder_args - Asserti... 121s FAILED tests/brain/test_brain.py::TypingBrain::test_typing_types - AssertionE... 121s FAILED tests/brain/test_pathlib.py::test_inference_parents - AssertionError: ... 121s FAILED tests/brain/test_pathlib.py::test_inference_parents_subscript_index - ... 121s FAILED tests/test_builder.py::FileBuildTest::test_class_base_props - astroid.... 121s FAILED tests/test_builder.py::FileBuildTest::test_class_basenames - astroid.e... 121s FAILED tests/test_builder.py::FileBuildTest::test_class_instance_attrs - astr... 121s FAILED tests/test_builder.py::FileBuildTest::test_class_locals - astroid.exce... 121s FAILED tests/test_builder.py::FileBuildTest::test_function_base_props - astro... 121s FAILED tests/test_builder.py::FileBuildTest::test_function_locals - astroid.e... 121s FAILED tests/test_builder.py::FileBuildTest::test_method_base_props - astroid... 121s FAILED tests/test_builder.py::FileBuildTest::test_method_locals - astroid.exc... 121s FAILED tests/test_builder.py::FileBuildTest::test_module_base_props - astroid... 121s FAILED tests/test_builder.py::FileBuildTest::test_module_locals - astroid.exc... 121s FAILED tests/test_builder.py::FileBuildTest::test_unknown_encoding - astroid.... 121s FAILED tests/test_inference.py::InferenceTest::test_binary_op_or_union_type 121s FAILED tests/test_lookup.py::LookupTest::test_builtin_lookup - astroid.except... 121s FAILED tests/test_lookup.py::LookupTest::test_class - astroid.exceptions.Astr... 121s FAILED tests/test_lookup.py::LookupTest::test_class_ancestor_name - astroid.e... 121s FAILED tests/test_lookup.py::LookupTest::test_class_in_function - astroid.exc... 121s FAILED tests/test_lookup.py::LookupTest::test_class_variables - astroid.excep... 121s FAILED tests/test_lookup.py::LookupTest::test_decorator_arguments_lookup - as... 121s FAILED tests/test_lookup.py::LookupTest::test_dict_comp_nested - astroid.exce... 121s FAILED tests/test_lookup.py::LookupTest::test_dict_comps - astroid.exceptions... 121s FAILED tests/test_lookup.py::LookupTest::test_explicit___name__ - astroid.exc... 121s FAILED tests/test_lookup.py::LookupTest::test_function_argument_with_default 121s FAILED tests/test_lookup.py::LookupTest::test_function_module_special - astro... 121s FAILED tests/test_lookup.py::LookupTest::test_function_nested - astroid.excep... 121s FAILED tests/test_lookup.py::LookupTest::test_generator_attributes - astroid.... 121s FAILED tests/test_lookup.py::LookupTest::test_global_delete - astroid.excepti... 121s FAILED tests/test_lookup.py::LookupTest::test_inner_classes - astroid.excepti... 121s FAILED tests/test_lookup.py::LookupTest::test_inner_decorator_member_lookup 121s FAILED tests/test_lookup.py::LookupTest::test_lambda_nested - astroid.excepti... 121s FAILED tests/test_lookup.py::LookupTest::test_limit - astroid.exceptions.Astr... 121s FAILED tests/test_lookup.py::LookupTest::test_list_comp_nested - astroid.exce... 121s FAILED tests/test_lookup.py::LookupTest::test_list_comp_target - astroid.exce... 121s FAILED tests/test_lookup.py::LookupTest::test_list_comps - astroid.exceptions... 121s FAILED tests/test_lookup.py::LookupTest::test_loopvar_hiding - astroid.except... 121s FAILED tests/test_lookup.py::LookupTest::test_method - astroid.exceptions.Ast... 121s FAILED tests/test_lookup.py::LookupTest::test_module - astroid.exceptions.Ast... 121s FAILED tests/test_lookup.py::LookupTest::test_set_comp_closure - astroid.exce... 121s FAILED tests/test_lookup.py::LookupTest::test_set_comp_nested - astroid.excep... 121s FAILED tests/test_lookup.py::LookupTest::test_set_comps - astroid.exceptions.... 121s FAILED tests/test_lookup.py::LookupTest::test_static_method_lookup - astroid.... 121s FAILED tests/test_nodes.py::AsStringTest::test_module_as_string - astroid.exc... 121s FAILED tests/test_nodes.py::ImportNodeTest::test_absolute_import - astroid.ex... 121s FAILED tests/test_nodes.py::ImportNodeTest::test_as_string - astroid.exceptio... 121s FAILED tests/test_nodes.py::ImportNodeTest::test_bad_import_inference - astro... 121s FAILED tests/test_nodes.py::ImportNodeTest::test_conditional - astroid.except... 121s FAILED tests/test_nodes.py::ImportNodeTest::test_conditional_import - astroid... 121s FAILED tests/test_nodes.py::ImportNodeTest::test_from_self_resolve - astroid.... 121s FAILED tests/test_nodes.py::ImportNodeTest::test_import_self_resolve - astroi... 121s FAILED tests/test_nodes.py::ImportNodeTest::test_more_absolute_import - astro... 121s FAILED tests/test_nodes.py::ImportNodeTest::test_real_name - astroid.exceptio... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_comment_before_docstring 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_dict_interface - astr... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_file_stream_api - ast... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_file_stream_in_memory 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_file_stream_physical 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_getattr - astroid.exc... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_import_1 - astroid.ex... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_import_2 - astroid.ex... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_import_unavailable_module 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_module_getattr - astr... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_multiline_docstring 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_public_names - astroi... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_relative_to_absolute_name 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_relative_to_absolute_name_beyond_top_level 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_singleline_docstring 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_special_attributes - ... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_stream_api - astroid.... 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_wildcard_import_names 121s FAILED tests/test_scoped_nodes.py::ModuleNodeTest::test_without_docstring - a... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_abstract_methods_are_not_implicitly_none 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_argnames - astroid.... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_argnames_lambda - a... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_decorator_builtin_descriptors 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_default_value - ast... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_dict_interface - as... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_display_type - astr... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_docstring_special_cases 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_dunder_class_local_to_classmethod 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_dunder_class_local_to_function 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_dunder_class_local_to_method 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_format_args - astro... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_format_args_keyword_only_args 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_four_args - astroid... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_func_instance_attr 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_func_is_bound - ast... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_igetattr - astroid.... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_inference_error - a... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_is_abstract - astro... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_is_abstract_decorated 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_is_generator - astr... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_is_method - astroid... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_lambda_getattr - as... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_lambda_pytype - ast... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_lambda_qname - astr... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_method_init_subclass 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_multiline_docstring 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_multiline_docstring_async 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_navigation - astroi... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_no_returns_is_implicitly_none 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_only_raises_is_not_implicitly_none 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_positional_only_argnames 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_return_annotation_is_not_the_last 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_return_nothing - as... 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_singleline_docstring 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_special_attributes 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_type_builtin_descriptor_subclasses 121s FAILED tests/test_scoped_nodes.py::FunctionNodeTest::test_without_docstring 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test__bases__attribute - as... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test__mro__attribute - astr... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_add_metaclass - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_all_ancestors_need_slots 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_ancestors - astroid.ex... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_class_extra_decorators 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_class_extra_decorators_frame_is_not_class 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_class_extra_decorators_only_assignment_names_are_considered 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_class_extra_decorators_only_callfunc_are_considered 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_class_extra_decorators_only_same_name_considered 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_class_getattr - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_class_keywords - astro... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_classmethod_attributes 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_cls_special_attributes_1 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_cls_special_attributes_2 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_dict_interface - astro... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_duplicate_bases_namedtuple 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_extra_decorators_only_class_level_assignments 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_function_with_decorator_lineno 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_generator_from_infer_call_result_parent 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_getattr_from_grandpa 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_getattr_method_transform 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_getattr_with_enpty_annassign 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_has_dynamic_getattr - ... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_implicit_metaclass - a... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_implicit_metaclass_lookup 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_inner_classes - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_instance_attr_ancestors 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_instance_bound_method_lambdas 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_instance_bound_method_lambdas_2 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_instance_getattr - ast... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_instance_getattr_with_class_attr 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_instance_special_attributes 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_kite_graph - astroid.e... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_local_attr_ancestors 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_local_attr_invalid_mro 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_local_attr_mro - astro... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_metaclass_error - astr... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_metaclass_generator_hack 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_metaclass_generator_hack_enum_base 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_metaclass_lookup - ast... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_metaclass_lookup_inference_errors 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_metaclass_lookup_using_same_class 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_metaclass_type - astro... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_metaclass_yes_leak - a... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_methods - astroid.exce... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro - astroid.exceptio... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_1 - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_2 - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_3 - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_4 - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_5 - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_6 - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_7 - astroi... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_error_1 - ... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_error_2 - ... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_typing_extensions 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_with_attribute_classes 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_with_factories - a... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_multiline_docstring - ... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_navigation - astroid.e... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_no_infinite_metaclass_loop 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_no_infinite_metaclass_loop_with_redefine 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_nonregr_infer_callresult 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_singleline_docstring 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_slots - astroid.except... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_slots_added_dynamically_still_inferred 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_slots_empty_list_of_slots 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_slots_for_dict_keys - ... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_slots_taken_from_parents 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_type - astroid.excepti... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_type_three_arguments 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_using_invalid_six_add_metaclass_call 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_with_invalid_metaclass 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_with_metaclass_mro - a... 121s FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_without_docstring - as... 121s ========== 187 failed, 1452 passed, 54 skipped, 15 xfailed in 30.08s =========== 122s ============================= test session starts ============================== 122s platform linux -- Python 3.13.9, pytest-8.3.5, pluggy-1.6.0 122s rootdir: /tmp/autopkgtest.GZhZSC/autopkgtest_tmp/build 122s configfile: pyproject.toml 122s plugins: typeguard-4.4.2 122s collected 1708 items 122s 122s tests/brain/numpy/test_core_einsumfunc.py ss [ 0%] 122s tests/brain/numpy/test_core_fromnumeric.py s [ 0%] 122s tests/brain/numpy/test_core_function_base.py s [ 0%] 122s tests/brain/numpy/test_core_multiarray.py sssss [ 0%] 122s tests/brain/numpy/test_core_numeric.py sssss [ 0%] 122s tests/brain/numpy/test_core_numerictypes.py sssssss.. [ 1%] 122s tests/brain/numpy/test_core_umath.py ssssssss [ 1%] 122s tests/brain/numpy/test_ma.py ssss [ 2%] 122s tests/brain/numpy/test_ndarray.py sss [ 2%] 122s tests/brain/numpy/test_random_mtrand.py ss [ 2%] 122s tests/brain/test_argparse.py . [ 2%] 122s tests/brain/test_attr.py ....... [ 2%] 123s tests/brain/test_brain.py ......s.....ss................................ [ 5%] 123s ............s.........................................................x. [ 9%] 123s ..............s...... [ 10%] 123s tests/brain/test_builtin.py .................. [ 12%] 123s tests/brain/test_ctypes.py ....x........................ [ 13%] 124s tests/brain/test_dataclasses.py ........................................ [ 16%] 124s ......................................x... [ 18%] 124s tests/brain/test_dateutil.py . [ 18%] 124s tests/brain/test_enum.py ............................. [ 20%] 124s tests/brain/test_hashlib.py ... [ 20%] 124s tests/brain/test_multiprocessing.py ... [ 20%] 124s tests/brain/test_named_tuple.py ....................... [ 21%] 124s tests/brain/test_nose.py s [ 22%] 124s tests/brain/test_pathlib.py .... [ 22%] 124s tests/brain/test_pytest.py . [ 22%] 124s tests/brain/test_qt.py sss [ 22%] 124s tests/brain/test_regex.py ss [ 22%] 124s tests/brain/test_signal.py ... [ 22%] 125s tests/brain/test_six.py ....... [ 23%] 125s tests/brain/test_ssl.py .. [ 23%] 125s tests/brain/test_threading.py .... [ 23%] 125s tests/brain/test_typing.py ..... [ 23%] 126s tests/brain/test_typing_extensions.py . [ 23%] 126s tests/brain/test_unittest.py . [ 23%] 127s tests/test_builder.py .................................................. [ 26%] 127s ........ [ 27%] 127s tests/test_constraint.py ................................... [ 29%] 127s tests/test_decorators.py ... [ 29%] 127s tests/test_filter_statements.py . [ 29%] 127s tests/test_group_exceptions.py ... [ 29%] 127s tests/test_helpers.py ............... [ 30%] 127s tests/test_inference.py ................................................ [ 33%] 127s ............................................x...........x......x........ [ 37%] 127s ..................................................x..................... [ 41%] 127s ........................................................................ [ 46%] 128s ................................................x........xx............. [ 50%] 128s ........x...x................................................x.......... [ 54%] 128s ................................. [ 56%] 128s tests/test_inference_calls.py ........................ [ 57%] 128s tests/test_lookup.py ................................................... [ 60%] 128s .... [ 61%] 137s tests/test_manager.py .....................................s....... [ 63%] 137s tests/test_modutils.py ................................................. [ 66%] 137s ................s. [ 67%] 138s tests/test_nodes.py .................................................... [ 70%] 138s ........................................................................ [ 74%] 138s ................................................................ [ 78%] 138s tests/test_nodes_lineno.py ....................... [ 80%] 138s tests/test_nodes_position.py ... [ 80%] 139s tests/test_object_model.py x...............x.........s........... [ 82%] 139s tests/test_objects.py ...................... [ 83%] 139s tests/test_protocols.py ..................... [ 84%] 139s tests/test_python3.py .......................... [ 86%] 139s tests/test_raw_building.py ............. [ 87%] 142s tests/test_regrtest.py .............ss............ [ 88%] 143s tests/test_scoped_nodes.py ............................................. [ 91%] 144s ........................................................................ [ 95%] 145s .................................................. [ 98%] 145s tests/test_stdlib.py .. [ 98%] 145s tests/test_transforms.py ......... [ 99%] 145s tests/test_type_params.py ..... [ 99%] 145s tests/test_utils.py ........ [100%] 145s 145s ================ 1639 passed, 54 skipped, 15 xfailed in 24.37s ================= 145s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p "3.14 3.13" returned exit code 13 145s make: *** [/tmp/grcNzXaiEN/run:4: pybuild-autopkgtest] Error 25 145s pybuild-autopkgtest: error: /tmp/grcNzXaiEN/run pybuild-autopkgtest returned exit code 2 145s autopkgtest [12:18:54]: test pybuild-autopkgtest: -----------------------] 147s pybuild-autopkgtest FAIL non-zero exit status 25 147s autopkgtest [12:18:56]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 148s autopkgtest [12:18:57]: @@@@@@@@@@@@@@@@@@@@ summary 148s pybuild-autopkgtest FAIL non-zero exit status 25