0s autopkgtest [21:13:40]: starting date and time: 2024-11-23 21:13:40+0000 0s autopkgtest [21:13:40]: git checkout: 0acbae0a WIP show VirtSubproc stderr in real-time 0s autopkgtest [21:13:40]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.3e2x1jzh/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python3-defaults --apt-upgrade python-bytecode --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python3-defaults/3.12.7-1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-arm64-27.secgroup --name adt-plucky-arm64-python-bytecode-20241123-203536-juju-7f2275-prod-proposed-migration-environment-2-cc904610-4b72-4980-adf9-125f82b8d97c --image adt/ubuntu-plucky-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 52s autopkgtest [21:14:32]: testbed dpkg architecture: arm64 52s autopkgtest [21:14:32]: testbed apt version: 2.9.8 52s autopkgtest [21:14:32]: @@@@@@@@@@@@@@@@@@@@ test bed setup 53s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 54s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [53.2 kB] 54s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [13.6 kB] 54s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [9704 B] 54s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [925 kB] 54s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 Packages [85.2 kB] 54s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/restricted arm64 Packages [57.8 kB] 54s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 Packages [790 kB] 54s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 Packages [19.3 kB] 54s Fetched 2028 kB in 1s (2430 kB/s) 54s Reading package lists... 57s Reading package lists... 57s Building dependency tree... 57s Reading state information... 58s Calculating upgrade... 58s The following package was automatically installed and is no longer required: 58s libsgutils2-1.46-2 58s Use 'sudo apt autoremove' to remove it. 58s The following NEW packages will be installed: 58s libsgutils2-1.48 58s The following packages will be upgraded: 58s bash bpftrace curl debconf debconf-i18n distro-info dracut-install 58s fwupd-signed gir1.2-girepository-2.0 gir1.2-glib-2.0 hostname 58s libaudit-common libaudit1 libcurl3t64-gnutls libcurl4t64 58s libgirepository-1.0-1 libglib2.0-0t64 libglib2.0-data libpam-modules 58s libpam-modules-bin libpam-runtime libpam0g libplymouth5 libpython3-stdlib 58s libselinux1 libsemanage-common libsemanage2 linux-base lxd-installer 58s openssh-client openssh-server openssh-sftp-server pinentry-curses plymouth 58s plymouth-theme-ubuntu-text python3 python3-blinker python3-dbus 58s python3-debconf python3-gi python3-jsonschema-specifications python3-minimal 58s python3-rpds-py python3-yaml sg3-utils sg3-utils-udev vim-common vim-tiny 58s xxd 59s 49 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 59s Need to get 11.8 MB of archives. 59s After this operation, 2984 kB of additional disk space will be used. 59s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 bash arm64 5.2.32-1ubuntu2 [791 kB] 59s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 hostname arm64 3.25 [11.0 kB] 59s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 libaudit-common all 1:4.0.2-2ubuntu1 [6578 B] 59s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 libaudit1 arm64 1:4.0.2-2ubuntu1 [54.2 kB] 59s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 debconf-i18n all 1.5.87ubuntu1 [204 kB] 59s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 python3-minimal arm64 3.12.7-1 [27.4 kB] 59s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 python3 arm64 3.12.7-1 [24.0 kB] 59s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libpython3-stdlib arm64 3.12.7-1 [10.0 kB] 59s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-debconf all 1.5.87ubuntu1 [4156 B] 59s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 debconf all 1.5.87ubuntu1 [124 kB] 59s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 libpam0g arm64 1.5.3-7ubuntu4 [68.6 kB] 59s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 libselinux1 arm64 3.7-3ubuntu1 [81.6 kB] 59s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libpam-modules-bin arm64 1.5.3-7ubuntu4 [50.4 kB] 59s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libpam-modules arm64 1.5.3-7ubuntu4 [285 kB] 59s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 openssh-sftp-server arm64 1:9.9p1-3ubuntu2 [36.8 kB] 59s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 openssh-server arm64 1:9.9p1-3ubuntu2 [524 kB] 59s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 openssh-client arm64 1:9.9p1-3ubuntu2 [920 kB] 59s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 libpam-runtime all 1.5.3-7ubuntu4 [40.8 kB] 59s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 libsemanage-common all 3.7-2build1 [7186 B] 59s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 libsemanage2 arm64 3.7-2build1 [92.2 kB] 59s Get:21 http://ftpmaster.internal/ubuntu plucky/main arm64 distro-info arm64 1.12 [19.4 kB] 59s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 gir1.2-girepository-2.0 arm64 1.82.0-2 [25.2 kB] 59s Get:23 http://ftpmaster.internal/ubuntu plucky/main arm64 gir1.2-glib-2.0 arm64 2.82.2-3 [182 kB] 59s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 libglib2.0-0t64 arm64 2.82.2-3 [1560 kB] 59s Get:25 http://ftpmaster.internal/ubuntu plucky/main arm64 libgirepository-1.0-1 arm64 1.82.0-2 [83.0 kB] 59s Get:26 http://ftpmaster.internal/ubuntu plucky/main arm64 libglib2.0-data all 2.82.2-3 [51.7 kB] 59s Get:27 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-dbus arm64 1.3.2-5build4 [109 kB] 59s Get:28 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-gi arm64 3.50.0-3build1 [279 kB] 59s Get:29 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-yaml arm64 6.0.2-1build1 [164 kB] 59s Get:30 http://ftpmaster.internal/ubuntu plucky/main arm64 vim-tiny arm64 2:9.1.0861-1ubuntu1 [805 kB] 59s Get:31 http://ftpmaster.internal/ubuntu plucky/main arm64 vim-common all 2:9.1.0861-1ubuntu1 [395 kB] 59s Get:32 http://ftpmaster.internal/ubuntu plucky/main arm64 xxd arm64 2:9.1.0861-1ubuntu1 [67.3 kB] 59s Get:33 http://ftpmaster.internal/ubuntu plucky/main arm64 libplymouth5 arm64 24.004.60-2ubuntu3 [141 kB] 59s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 plymouth-theme-ubuntu-text arm64 24.004.60-2ubuntu3 [9914 B] 59s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 plymouth arm64 24.004.60-2ubuntu3 [135 kB] 59s Get:36 http://ftpmaster.internal/ubuntu plucky/main arm64 bpftrace arm64 0.21.2-2ubuntu3 [1854 kB] 60s Get:37 http://ftpmaster.internal/ubuntu plucky/main arm64 curl arm64 8.9.1-2ubuntu3 [235 kB] 60s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 libcurl4t64 arm64 8.9.1-2ubuntu3 [365 kB] 60s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 dracut-install arm64 105-2ubuntu2 [34.7 kB] 60s Get:40 http://ftpmaster.internal/ubuntu plucky/main arm64 fwupd-signed arm64 1.55+1.7-1 [30.9 kB] 60s Get:41 http://ftpmaster.internal/ubuntu plucky/main arm64 libcurl3t64-gnutls arm64 8.9.1-2ubuntu3 [359 kB] 60s Get:42 http://ftpmaster.internal/ubuntu plucky/main arm64 libsgutils2-1.48 arm64 1.48-0ubuntu1 [118 kB] 60s Get:43 http://ftpmaster.internal/ubuntu plucky/main arm64 linux-base all 4.10.1ubuntu1 [34.8 kB] 60s Get:44 http://ftpmaster.internal/ubuntu plucky/main arm64 lxd-installer all 10 [5264 B] 60s Get:45 http://ftpmaster.internal/ubuntu plucky/main arm64 pinentry-curses arm64 1.3.1-0ubuntu2 [38.5 kB] 60s Get:46 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-blinker all 1.9.0-1 [10.7 kB] 60s Get:47 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-rpds-py arm64 0.21.0-2ubuntu1 [302 kB] 60s Get:48 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-jsonschema-specifications all 2023.12.1-2 [9116 B] 60s Get:49 http://ftpmaster.internal/ubuntu plucky/main arm64 sg3-utils arm64 1.48-0ubuntu1 [999 kB] 60s Get:50 http://ftpmaster.internal/ubuntu plucky/main arm64 sg3-utils-udev all 1.48-0ubuntu1 [6608 B] 60s Preconfiguring packages ... 60s Fetched 11.8 MB in 1s (9938 kB/s) 61s (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 ... 80002 files and directories currently installed.) 61s Preparing to unpack .../bash_5.2.32-1ubuntu2_arm64.deb ... 61s Unpacking bash (5.2.32-1ubuntu2) over (5.2.32-1ubuntu1) ... 61s Setting up bash (5.2.32-1ubuntu2) ... 61s update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode 61s (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 ... 80002 files and directories currently installed.) 61s Preparing to unpack .../hostname_3.25_arm64.deb ... 61s Unpacking hostname (3.25) over (3.23+nmu2ubuntu2) ... 61s Setting up hostname (3.25) ... 61s (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 ... 80002 files and directories currently installed.) 61s Preparing to unpack .../libaudit-common_1%3a4.0.2-2ubuntu1_all.deb ... 61s Unpacking libaudit-common (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 61s Setting up libaudit-common (1:4.0.2-2ubuntu1) ... 61s (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 ... 80002 files and directories currently installed.) 61s Preparing to unpack .../libaudit1_1%3a4.0.2-2ubuntu1_arm64.deb ... 61s Unpacking libaudit1:arm64 (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 61s Setting up libaudit1:arm64 (1:4.0.2-2ubuntu1) ... 61s (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 ... 80002 files and directories currently installed.) 61s Preparing to unpack .../debconf-i18n_1.5.87ubuntu1_all.deb ... 61s Unpacking debconf-i18n (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 61s Preparing to unpack .../python3-minimal_3.12.7-1_arm64.deb ... 61s Unpacking python3-minimal (3.12.7-1) over (3.12.6-0ubuntu1) ... 61s Setting up python3-minimal (3.12.7-1) ... 62s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 80002 files and directories currently installed.) 62s Preparing to unpack .../python3_3.12.7-1_arm64.deb ... 62s Unpacking python3 (3.12.7-1) over (3.12.6-0ubuntu1) ... 62s Preparing to unpack .../libpython3-stdlib_3.12.7-1_arm64.deb ... 62s Unpacking libpython3-stdlib:arm64 (3.12.7-1) over (3.12.6-0ubuntu1) ... 62s Preparing to unpack .../python3-debconf_1.5.87ubuntu1_all.deb ... 62s Unpacking python3-debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 62s Preparing to unpack .../debconf_1.5.87ubuntu1_all.deb ... 62s Unpacking debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 62s Setting up debconf (1.5.87ubuntu1) ... 62s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 80002 files and directories currently installed.) 62s Preparing to unpack .../libpam0g_1.5.3-7ubuntu4_arm64.deb ... 62s Unpacking libpam0g:arm64 (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 62s Setting up libpam0g:arm64 (1.5.3-7ubuntu4) ... 62s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 80002 files and directories currently installed.) 62s Preparing to unpack .../libselinux1_3.7-3ubuntu1_arm64.deb ... 62s Unpacking libselinux1:arm64 (3.7-3ubuntu1) over (3.5-2ubuntu5) ... 63s Setting up libselinux1:arm64 (3.7-3ubuntu1) ... 63s (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 ... 80002 files and directories currently installed.) 63s Preparing to unpack .../libpam-modules-bin_1.5.3-7ubuntu4_arm64.deb ... 63s Unpacking libpam-modules-bin (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 63s Setting up libpam-modules-bin (1.5.3-7ubuntu4) ... 63s pam_namespace.service is a disabled or a static unit not running, not starting it. 63s (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 ... 80002 files and directories currently installed.) 63s Preparing to unpack .../libpam-modules_1.5.3-7ubuntu4_arm64.deb ... 63s Unpacking libpam-modules:arm64 (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 63s Setting up libpam-modules:arm64 (1.5.3-7ubuntu4) ... 63s (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 ... 80002 files and directories currently installed.) 63s Preparing to unpack .../openssh-sftp-server_1%3a9.9p1-3ubuntu2_arm64.deb ... 63s Unpacking openssh-sftp-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 63s Preparing to unpack .../openssh-server_1%3a9.9p1-3ubuntu2_arm64.deb ... 63s Unpacking openssh-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 63s Preparing to unpack .../openssh-client_1%3a9.9p1-3ubuntu2_arm64.deb ... 63s Unpacking openssh-client (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 63s Preparing to unpack .../libpam-runtime_1.5.3-7ubuntu4_all.deb ... 63s Unpacking libpam-runtime (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 63s Setting up libpam-runtime (1.5.3-7ubuntu4) ... 64s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 80004 files and directories currently installed.) 64s Preparing to unpack .../libsemanage-common_3.7-2build1_all.deb ... 64s Unpacking libsemanage-common (3.7-2build1) over (3.5-1build6) ... 64s Setting up libsemanage-common (3.7-2build1) ... 64s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 80003 files and directories currently installed.) 64s Preparing to unpack .../libsemanage2_3.7-2build1_arm64.deb ... 64s Unpacking libsemanage2:arm64 (3.7-2build1) over (3.5-1build6) ... 64s Setting up libsemanage2:arm64 (3.7-2build1) ... 64s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 80003 files and directories currently installed.) 64s Preparing to unpack .../00-distro-info_1.12_arm64.deb ... 64s Unpacking distro-info (1.12) over (1.9) ... 64s Preparing to unpack .../01-gir1.2-girepository-2.0_1.82.0-2_arm64.deb ... 64s Unpacking gir1.2-girepository-2.0:arm64 (1.82.0-2) over (1.80.1-4) ... 64s Preparing to unpack .../02-gir1.2-glib-2.0_2.82.2-3_arm64.deb ... 64s Unpacking gir1.2-glib-2.0:arm64 (2.82.2-3) over (2.82.1-0ubuntu1) ... 64s Preparing to unpack .../03-libglib2.0-0t64_2.82.2-3_arm64.deb ... 64s Unpacking libglib2.0-0t64:arm64 (2.82.2-3) over (2.82.1-0ubuntu1) ... 64s Preparing to unpack .../04-libgirepository-1.0-1_1.82.0-2_arm64.deb ... 64s Unpacking libgirepository-1.0-1:arm64 (1.82.0-2) over (1.80.1-4) ... 64s Preparing to unpack .../05-libglib2.0-data_2.82.2-3_all.deb ... 64s Unpacking libglib2.0-data (2.82.2-3) over (2.82.1-0ubuntu1) ... 64s Preparing to unpack .../06-python3-dbus_1.3.2-5build4_arm64.deb ... 64s Unpacking python3-dbus (1.3.2-5build4) over (1.3.2-5build3) ... 64s Preparing to unpack .../07-python3-gi_3.50.0-3build1_arm64.deb ... 64s Unpacking python3-gi (3.50.0-3build1) over (3.50.0-3) ... 64s Preparing to unpack .../08-python3-yaml_6.0.2-1build1_arm64.deb ... 64s Unpacking python3-yaml (6.0.2-1build1) over (6.0.2-1) ... 64s Preparing to unpack .../09-vim-tiny_2%3a9.1.0861-1ubuntu1_arm64.deb ... 65s Unpacking vim-tiny (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 65s Preparing to unpack .../10-vim-common_2%3a9.1.0861-1ubuntu1_all.deb ... 65s Unpacking vim-common (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 65s Preparing to unpack .../11-xxd_2%3a9.1.0861-1ubuntu1_arm64.deb ... 65s Unpacking xxd (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 65s Preparing to unpack .../12-libplymouth5_24.004.60-2ubuntu3_arm64.deb ... 65s Unpacking libplymouth5:arm64 (24.004.60-2ubuntu3) over (24.004.60-1ubuntu11) ... 65s Preparing to unpack .../13-plymouth-theme-ubuntu-text_24.004.60-2ubuntu3_arm64.deb ... 65s Unpacking plymouth-theme-ubuntu-text (24.004.60-2ubuntu3) over (24.004.60-1ubuntu11) ... 65s Preparing to unpack .../14-plymouth_24.004.60-2ubuntu3_arm64.deb ... 65s Unpacking plymouth (24.004.60-2ubuntu3) over (24.004.60-1ubuntu11) ... 65s Preparing to unpack .../15-bpftrace_0.21.2-2ubuntu3_arm64.deb ... 65s Unpacking bpftrace (0.21.2-2ubuntu3) over (0.21.2-2ubuntu2) ... 65s Preparing to unpack .../16-curl_8.9.1-2ubuntu3_arm64.deb ... 65s Unpacking curl (8.9.1-2ubuntu3) over (8.9.1-2ubuntu2) ... 65s Preparing to unpack .../17-libcurl4t64_8.9.1-2ubuntu3_arm64.deb ... 65s Unpacking libcurl4t64:arm64 (8.9.1-2ubuntu3) over (8.9.1-2ubuntu2) ... 65s Preparing to unpack .../18-dracut-install_105-2ubuntu2_arm64.deb ... 65s Unpacking dracut-install (105-2ubuntu2) over (105-1ubuntu1) ... 65s Preparing to unpack .../19-fwupd-signed_1.55+1.7-1_arm64.deb ... 65s Unpacking fwupd-signed (1.55+1.7-1) over (1.54+1.6-1build1) ... 65s Preparing to unpack .../20-libcurl3t64-gnutls_8.9.1-2ubuntu3_arm64.deb ... 65s Unpacking libcurl3t64-gnutls:arm64 (8.9.1-2ubuntu3) over (8.9.1-2ubuntu2) ... 65s Selecting previously unselected package libsgutils2-1.48:arm64. 65s Preparing to unpack .../21-libsgutils2-1.48_1.48-0ubuntu1_arm64.deb ... 65s Unpacking libsgutils2-1.48:arm64 (1.48-0ubuntu1) ... 65s Preparing to unpack .../22-linux-base_4.10.1ubuntu1_all.deb ... 65s Unpacking linux-base (4.10.1ubuntu1) over (4.5ubuntu9) ... 65s Preparing to unpack .../23-lxd-installer_10_all.deb ... 65s Unpacking lxd-installer (10) over (9) ... 65s Preparing to unpack .../24-pinentry-curses_1.3.1-0ubuntu2_arm64.deb ... 65s Unpacking pinentry-curses (1.3.1-0ubuntu2) over (1.2.1-3ubuntu5) ... 65s Preparing to unpack .../25-python3-blinker_1.9.0-1_all.deb ... 65s Unpacking python3-blinker (1.9.0-1) over (1.8.2-1) ... 65s Preparing to unpack .../26-python3-rpds-py_0.21.0-2ubuntu1_arm64.deb ... 65s Unpacking python3-rpds-py (0.21.0-2ubuntu1) over (0.20.0-0ubuntu3) ... 66s Preparing to unpack .../27-python3-jsonschema-specifications_2023.12.1-2_all.deb ... 66s Unpacking python3-jsonschema-specifications (2023.12.1-2) over (2023.12.1-1ubuntu1) ... 66s Preparing to unpack .../28-sg3-utils_1.48-0ubuntu1_arm64.deb ... 66s Unpacking sg3-utils (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 66s Preparing to unpack .../29-sg3-utils-udev_1.48-0ubuntu1_all.deb ... 66s Unpacking sg3-utils-udev (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 66s Setting up pinentry-curses (1.3.1-0ubuntu2) ... 66s Setting up distro-info (1.12) ... 66s Setting up linux-base (4.10.1ubuntu1) ... 66s Setting up libcurl4t64:arm64 (8.9.1-2ubuntu3) ... 66s Setting up bpftrace (0.21.2-2ubuntu3) ... 66s Setting up openssh-client (1:9.9p1-3ubuntu2) ... 66s Setting up libcurl3t64-gnutls:arm64 (8.9.1-2ubuntu3) ... 66s Setting up fwupd-signed (1.55+1.7-1) ... 66s Setting up libsgutils2-1.48:arm64 (1.48-0ubuntu1) ... 66s Setting up debconf-i18n (1.5.87ubuntu1) ... 66s Setting up xxd (2:9.1.0861-1ubuntu1) ... 66s Setting up libglib2.0-0t64:arm64 (2.82.2-3) ... 66s No schema files found: doing nothing. 66s Setting up libglib2.0-data (2.82.2-3) ... 66s Setting up vim-common (2:9.1.0861-1ubuntu1) ... 66s Setting up gir1.2-glib-2.0:arm64 (2.82.2-3) ... 66s Setting up lxd-installer (10) ... 66s Setting up dracut-install (105-2ubuntu2) ... 66s Setting up libplymouth5:arm64 (24.004.60-2ubuntu3) ... 66s Setting up libgirepository-1.0-1:arm64 (1.82.0-2) ... 66s Setting up curl (8.9.1-2ubuntu3) ... 66s Setting up libpython3-stdlib:arm64 (3.12.7-1) ... 66s Setting up sg3-utils (1.48-0ubuntu1) ... 66s Setting up openssh-sftp-server (1:9.9p1-3ubuntu2) ... 66s Setting up openssh-server (1:9.9p1-3ubuntu2) ... 66s Installing new version of config file /etc/ssh/moduli ... 67s Replacing config file /etc/ssh/sshd_config with new version 68s Setting up plymouth (24.004.60-2ubuntu3) ... 68s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 68s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 86s flash-kernel: deferring update (trigger activated) 86s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 86s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 87s Setting up python3 (3.12.7-1) ... 87s Setting up vim-tiny (2:9.1.0861-1ubuntu1) ... 87s Setting up sg3-utils-udev (1.48-0ubuntu1) ... 87s update-initramfs: deferring update (trigger activated) 87s Setting up plymouth-theme-ubuntu-text (24.004.60-2ubuntu3) ... 87s update-initramfs: deferring update (trigger activated) 87s Setting up gir1.2-girepository-2.0:arm64 (1.82.0-2) ... 87s Setting up python3-gi (3.50.0-3build1) ... 87s Setting up python3-rpds-py (0.21.0-2ubuntu1) ... 87s Setting up python3-jsonschema-specifications (2023.12.1-2) ... 87s Setting up python3-blinker (1.9.0-1) ... 88s Setting up python3-dbus (1.3.2-5build4) ... 88s Setting up python3-debconf (1.5.87ubuntu1) ... 88s Setting up python3-yaml (6.0.2-1build1) ... 88s Processing triggers for man-db (2.13.0-1) ... 90s Processing triggers for debianutils (5.21) ... 90s Processing triggers for install-info (7.1.1-1) ... 90s Processing triggers for initramfs-tools (0.142ubuntu35) ... 90s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 90s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 101s System running in EFI mode, skipping. 101s Processing triggers for libc-bin (2.40-1ubuntu3) ... 101s Processing triggers for ufw (0.36.2-8) ... 101s Processing triggers for flash-kernel (3.107ubuntu13) ... 101s System running in EFI mode, skipping. 101s Reading package lists... 102s Building dependency tree... 102s Reading state information... 102s The following packages will be REMOVED: 102s libsgutils2-1.46-2* 102s 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 102s After this operation, 314 kB disk space will be freed. 103s (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 ... 80037 files and directories currently installed.) 103s Removing libsgutils2-1.46-2:arm64 (1.46-3ubuntu5) ... 103s Processing triggers for libc-bin (2.40-1ubuntu3) ... 103s Hit:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease 103s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 103s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 103s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 104s Reading package lists... 104s Reading package lists... 104s Building dependency tree... 104s Reading state information... 105s Calculating upgrade... 105s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 105s Reading package lists... 105s Building dependency tree... 105s Reading state information... 106s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 106s autopkgtest [21:15:26]: rebooting testbed after setup commands that affected boot 110s autopkgtest-virt-ssh: WARNING: ssh connection failed. Retrying in 3 seconds... 133s autopkgtest [21:15:53]: testbed running kernel: Linux 6.11.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 16 14:19:41 UTC 2024 136s autopkgtest [21:15:56]: @@@@@@@@@@@@@@@@@@@@ apt-source python-bytecode 138s Get:1 http://ftpmaster.internal/ubuntu plucky/universe python-bytecode 0.15.1-3 (dsc) [2738 B] 138s Get:2 http://ftpmaster.internal/ubuntu plucky/universe python-bytecode 0.15.1-3 (tar) [93.8 kB] 138s Get:3 http://ftpmaster.internal/ubuntu plucky/universe python-bytecode 0.15.1-3 (diff) [9036 B] 138s gpgv: Signature made Wed Dec 27 19:06:00 2023 UTC 138s gpgv: using RSA key 7E1AC3FA27A649284C323EF6695C429316C07BFE 138s gpgv: issuer "jdg@debian.org" 138s gpgv: Can't check signature: No public key 138s dpkg-source: warning: cannot verify inline signature for ./python-bytecode_0.15.1-3.dsc: no acceptable signature found 138s autopkgtest [21:15:58]: testing package python-bytecode version 0.15.1-3 139s autopkgtest [21:15:59]: build not needed 139s autopkgtest [21:15:59]: test pytest: preparing testbed 140s Reading package lists... 140s Building dependency tree... 140s Reading state information... 141s Starting pkgProblemResolver with broken count: 0 141s Starting 2 pkgProblemResolver with broken count: 0 141s Done 141s The following additional packages will be installed: 141s fonts-font-awesome fonts-lato libjs-jquery libjs-sphinxdoc libjs-underscore 141s libpython3.13-minimal libpython3.13-stdlib python-bytecode-doc python3-all 141s python3-bytecode python3-iniconfig python3-packaging python3-pluggy 141s python3-pytest python3.13 python3.13-minimal sphinx-rtd-theme-common 141s Suggested packages: 141s python3.13-venv python3.13-doc binfmt-support 141s Recommended packages: 141s javascript-common 141s The following NEW packages will be installed: 141s autopkgtest-satdep fonts-font-awesome fonts-lato libjs-jquery 141s libjs-sphinxdoc libjs-underscore libpython3.13-minimal libpython3.13-stdlib 141s python-bytecode-doc python3-all python3-bytecode python3-iniconfig 141s python3-packaging python3-pluggy python3-pytest python3.13 141s python3.13-minimal sphinx-rtd-theme-common 142s 0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded. 142s Need to get 11.1 MB/11.1 MB of archives. 142s After this operation, 42.2 MB of additional disk space will be used. 142s Get:1 /tmp/autopkgtest.9LTF1j/1-autopkgtest-satdep.deb autopkgtest-satdep arm64 0 [728 B] 142s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-lato all 2.015-1 [2781 kB] 142s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 libpython3.13-minimal arm64 3.13.0-2 [877 kB] 142s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 python3.13-minimal arm64 3.13.0-2 [2100 kB] 142s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-font-awesome all 5.0.10+really4.7.0~dfsg-4.1 [516 kB] 142s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 142s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 142s Get:8 http://ftpmaster.internal/ubuntu plucky/main arm64 libjs-sphinxdoc all 7.4.7-4 [158 kB] 142s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 libpython3.13-stdlib arm64 3.13.0-2 [2073 kB] 142s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 sphinx-rtd-theme-common all 3.0.2+dfsg-1 [1014 kB] 142s Get:11 http://ftpmaster.internal/ubuntu plucky/universe arm64 python-bytecode-doc all 0.15.1-3 [64.6 kB] 142s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 python3.13 arm64 3.13.0-2 [719 kB] 142s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 python3-all arm64 3.12.7-1 [890 B] 142s Get:14 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-bytecode all 0.15.1-3 [44.7 kB] 142s Get:15 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-iniconfig all 1.1.1-2 [6024 B] 142s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-packaging all 24.2-1 [51.5 kB] 142s Get:17 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pluggy all 1.5.0-1 [21.0 kB] 142s Get:18 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pytest all 8.3.3-1 [251 kB] 143s Fetched 11.1 MB in 1s (11.6 MB/s) 143s Selecting previously unselected package fonts-lato. 143s (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 ... 80032 files and directories currently installed.) 143s Preparing to unpack .../00-fonts-lato_2.015-1_all.deb ... 143s Unpacking fonts-lato (2.015-1) ... 143s Selecting previously unselected package libpython3.13-minimal:arm64. 143s Preparing to unpack .../01-libpython3.13-minimal_3.13.0-2_arm64.deb ... 143s Unpacking libpython3.13-minimal:arm64 (3.13.0-2) ... 143s Selecting previously unselected package python3.13-minimal. 143s Preparing to unpack .../02-python3.13-minimal_3.13.0-2_arm64.deb ... 143s Unpacking python3.13-minimal (3.13.0-2) ... 143s Selecting previously unselected package fonts-font-awesome. 143s Preparing to unpack .../03-fonts-font-awesome_5.0.10+really4.7.0~dfsg-4.1_all.deb ... 143s Unpacking fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1) ... 143s Selecting previously unselected package libjs-jquery. 144s Preparing to unpack .../04-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 144s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 144s Selecting previously unselected package libjs-underscore. 144s Preparing to unpack .../05-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 144s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 144s Selecting previously unselected package libjs-sphinxdoc. 144s Preparing to unpack .../06-libjs-sphinxdoc_7.4.7-4_all.deb ... 144s Unpacking libjs-sphinxdoc (7.4.7-4) ... 144s Selecting previously unselected package libpython3.13-stdlib:arm64. 144s Preparing to unpack .../07-libpython3.13-stdlib_3.13.0-2_arm64.deb ... 144s Unpacking libpython3.13-stdlib:arm64 (3.13.0-2) ... 144s Selecting previously unselected package sphinx-rtd-theme-common. 144s Preparing to unpack .../08-sphinx-rtd-theme-common_3.0.2+dfsg-1_all.deb ... 144s Unpacking sphinx-rtd-theme-common (3.0.2+dfsg-1) ... 144s Selecting previously unselected package python-bytecode-doc. 144s Preparing to unpack .../09-python-bytecode-doc_0.15.1-3_all.deb ... 144s Unpacking python-bytecode-doc (0.15.1-3) ... 144s Selecting previously unselected package python3.13. 144s Preparing to unpack .../10-python3.13_3.13.0-2_arm64.deb ... 144s Unpacking python3.13 (3.13.0-2) ... 144s Selecting previously unselected package python3-all. 144s Preparing to unpack .../11-python3-all_3.12.7-1_arm64.deb ... 144s Unpacking python3-all (3.12.7-1) ... 144s Selecting previously unselected package python3-bytecode. 144s Preparing to unpack .../12-python3-bytecode_0.15.1-3_all.deb ... 144s Unpacking python3-bytecode (0.15.1-3) ... 144s Selecting previously unselected package python3-iniconfig. 144s Preparing to unpack .../13-python3-iniconfig_1.1.1-2_all.deb ... 144s Unpacking python3-iniconfig (1.1.1-2) ... 144s Selecting previously unselected package python3-packaging. 144s Preparing to unpack .../14-python3-packaging_24.2-1_all.deb ... 144s Unpacking python3-packaging (24.2-1) ... 144s Selecting previously unselected package python3-pluggy. 144s Preparing to unpack .../15-python3-pluggy_1.5.0-1_all.deb ... 144s Unpacking python3-pluggy (1.5.0-1) ... 144s Selecting previously unselected package python3-pytest. 144s Preparing to unpack .../16-python3-pytest_8.3.3-1_all.deb ... 144s Unpacking python3-pytest (8.3.3-1) ... 144s Selecting previously unselected package autopkgtest-satdep. 144s Preparing to unpack .../17-1-autopkgtest-satdep.deb ... 144s Unpacking autopkgtest-satdep (0) ... 144s Setting up python3-iniconfig (1.1.1-2) ... 144s Setting up fonts-lato (2.015-1) ... 144s Setting up libpython3.13-minimal:arm64 (3.13.0-2) ... 144s Setting up python3-packaging (24.2-1) ... 145s Setting up python3-bytecode (0.15.1-3) ... 145s Setting up python3-pluggy (1.5.0-1) ... 145s Setting up python3.13-minimal (3.13.0-2) ... 146s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 146s Setting up libpython3.13-stdlib:arm64 (3.13.0-2) ... 146s Setting up fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1) ... 146s Setting up sphinx-rtd-theme-common (3.0.2+dfsg-1) ... 146s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 146s Setting up python3.13 (3.13.0-2) ... 147s Setting up python3-pytest (8.3.3-1) ... 147s Setting up python3-all (3.12.7-1) ... 147s Setting up libjs-sphinxdoc (7.4.7-4) ... 147s Setting up python-bytecode-doc (0.15.1-3) ... 147s Setting up autopkgtest-satdep (0) ... 147s Processing triggers for man-db (2.13.0-1) ... 148s Processing triggers for systemd (256.5-2ubuntu4) ... 151s (Reading database ... 81171 files and directories currently installed.) 151s Removing autopkgtest-satdep (0) ... 152s autopkgtest [21:16:12]: test pytest: [----------------------- 152s Testing with python3.13: 153s ============================= test session starts ============================== 153s platform linux -- Python 3.13.0, pytest-8.3.3, pluggy-1.5.0 153s rootdir: /tmp/autopkgtest.9LTF1j/autopkgtest_tmp 153s plugins: typeguard-4.4.1 153s collected 165 items 153s 153s tests/test_bytecode.py F..sFFFsFFF...F..F.F..F..Fsss.FF.F [ 20%] 155s tests/test_cfg.py ....F.........FF.FFFFF....FFFFFFFFFFFFFFFF [ 46%] 156s tests/test_code.py FFFFFF [ 49%] 158s tests/test_concrete.py FF.FF.F..FF..F.FFFF..FF..FFFFFsFFFFFFFFFFFFFFFF [ 78%] 158s tests/test_flags.py ..ss.. [ 81%] 158s tests/test_instr.py ......FF...............F [ 96%] 159s tests/test_misc.py .FF.F. [100%] 159s 159s =================================== FAILURES =================================== 159s _________________ BytecodeTests.test_cellvar_freevar_roundtrip _________________ 159s 159s self = 159s 159s def test_cellvar_freevar_roundtrip(self): 159s from . import cell_free_vars_cases as cfc 159s 159s def recompile_code_and_inner(code): 159s bytecode = Bytecode.from_code( 159s code, 159s conserve_exception_block_stackdepth=True, 159s ) 159s for instr in bytecode: 159s if isinstance(instr, Instr) and isinstance(instr.arg, types.CodeType): 159s instr.arg = recompile_code_and_inner(instr.arg) 159s as_code = bytecode.to_code( 159s stacksize=code.co_stacksize, 159s compute_exception_stack_depths=False, 159s ) 159s self.assertCodeObjectEqual(code, as_code) 159s return as_code 159s 159s for f in cfc.TEST_CASES: 159s print(f.__name__) 159s with self.subTest(f.__name__): 159s origin = f.__code__ 159s > f.__code__ = recompile_code_and_inner(origin) 159s 159s tests/test_bytecode.py:711: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_bytecode.py:693: in recompile_code_and_inner 159s bytecode = Bytecode.from_code( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 94 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ----------------------------- Captured stdout call ----------------------------- 159s simple_cellvar 159s ____________________________ BytecodeTests.test_eq _____________________________ 159s 159s self = 159s 159s def test_eq(self): 159s code = get_code( 159s """ 159s if test: 159s x = 1 159s else: 159s x = 2 159s """ 159s ) 159s > b1 = Bytecode.from_code(code) 159s 159s tests/test_bytecode.py:139: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________________ BytecodeTests.test_eq_with_try ________________________ 159s 159s self = 159s 159s def test_eq_with_try(self): 159s code = get_code( 159s """ 159s try: 159s x = 1 159s except Exception: 159s pass 159s finally: 159s print() 159s """ 159s ) 159s > b1 = Bytecode.from_code(code) 159s 159s tests/test_bytecode.py:154: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________ BytecodeTests.test_exception_table_round_trip _________________ 159s 159s self = 159s 159s def test_exception_table_round_trip(self): 159s from . import exception_handling_cases as ehc 159s 159s for f in ehc.TEST_CASES: 159s print(f.__name__) 159s with self.subTest(f.__name__): 159s origin = f.__code__ 159s > bytecode = Bytecode.from_code( 159s origin, 159s conserve_exception_block_stackdepth=True, 159s ) 159s 159s tests/test_bytecode.py:673: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ----------------------------- Captured stdout call ----------------------------- 159s try_except_group 159s _________________________ BytecodeTests.test_from_code _________________________ 159s 159s self = 159s 159s def test_from_code(self): 159s code = get_code( 159s """ 159s if test: 159s x = 1 159s else: 159s x = 2 159s """ 159s ) 159s > bytecode = Bytecode.from_code(code) 159s 159s tests/test_bytecode.py:167: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________________ BytecodeTests.test_from_code_freevars _____________________ 159s 159s self = 159s 159s def test_from_code_freevars(self): 159s ns = {} 159s exec( 159s textwrap.dedent( 159s """ 159s def create_func(): 159s x = 1 159s def func(): 159s return x 159s return func 159s 159s func = create_func() 159s """ 159s ), 159s ns, 159s ns, 159s ) 159s code = ns["func"].__code__ 159s 159s > bytecode = Bytecode.from_code(code) 159s 159s tests/test_bytecode.py:259: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 62 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________________ BytecodeTests.test_from_code_load_fast ____________________ 159s 159s self = 159s 159s def test_from_code_load_fast(self): 159s code = get_code( 159s """ 159s def func(): 159s x = 33 159s y = x 159s """, 159s function=True, 159s ) 159s > code = Bytecode.from_code(code) 159s 159s tests/test_bytecode.py:285: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __ BytecodeTests.test_negative_size_binary_with_disable_check_of_pre_and_post __ 159s 159s self = 159s 159s def test_negative_size_binary_with_disable_check_of_pre_and_post(self): 159s operations = ( 159s "SUBSCR", # Subscr is special 159s "POWER", 159s "MULTIPLY", 159s "MATRIX_MULTIPLY", 159s "FLOOR_DIVIDE", 159s "TRUE_DIVIDE", 159s "ADD", 159s "SUBTRACT", 159s "LSHIFT", 159s "RSHIFT", 159s "AND", 159s "XOR", 159s "OR", 159s ) 159s if sys.version_info >= (3, 11): 159s operations += ("REMAINDER",) 159s else: 159s operations += ("MODULO",) 159s 159s for opname in operations: 159s ops = (opname,) 159s if opname != "SUBSCR": 159s ops += ("INPLACE_" + opname,) 159s for op in ops: 159s with self.subTest(op): 159s code = Bytecode() 159s code.first_lineno = 1 159s if sys.version_info >= (3, 11): 159s if op == "SUBSCR": 159s i = Instr("BINARY_SUBSCR") 159s else: 159s i = Instr("BINARY_OP", getattr(BinaryOp, op)) 159s else: 159s if "INPLACE" not in op: 159s op = "BINARY_" + op 159s i = Instr(op) 159s 159s code.extend([Instr("LOAD_CONST", 1), i]) 159s > co = code.to_code(check_pre_and_post=False) 159s 159s tests/test_bytecode.py:493: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _ BytecodeTests.test_negative_size_build_const_map_with_disable_check_of_pre_and_post _ 159s 159s self = 159s 159s def test_negative_size_build_const_map_with_disable_check_of_pre_and_post(self): 159s code = Bytecode() 159s code.first_lineno = 1 159s code.extend([Instr("LOAD_CONST", ("a",)), Instr("BUILD_CONST_KEY_MAP", 1)]) 159s > co = code.to_code(check_pre_and_post=False) 159s 159s tests/test_bytecode.py:559: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _ BytecodeTests.test_negative_size_build_map_with_disable_check_of_pre_and_post _ 159s 159s self = 159s 159s def test_negative_size_build_map_with_disable_check_of_pre_and_post(self): 159s code = Bytecode() 159s code.first_lineno = 1 159s code.extend([Instr("LOAD_CONST", 1), Instr("BUILD_MAP", 1)]) 159s > co = code.to_code(check_pre_and_post=False) 159s 159s tests/test_bytecode.py:545: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __ BytecodeTests.test_negative_size_unary_with_disable_check_of_pre_and_post ___ 159s 159s self = 159s 159s def test_negative_size_unary_with_disable_check_of_pre_and_post(self): 159s opnames = ( 159s "UNARY_POSITIVE", 159s "UNARY_NEGATIVE", 159s "UNARY_NOT", 159s "UNARY_INVERT", 159s ) 159s for opname in opnames: 159s # Replaced by an intrinsic in 3.12 159s if sys.version_info >= (3, 12) and opname == "UNARY_POSITIVE": 159s continue 159s with self.subTest(opname): 159s code = Bytecode() 159s code.first_lineno = 1 159s code.extend([Instr(opname)]) 159s > co = code.to_code(check_pre_and_post=False) 159s 159s tests/test_bytecode.py:407: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 42 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____ BytecodeTests.test_not_enough_copy_with_disable_check_of_pre_and_post _____ 159s 159s self = 159s 159s def test_not_enough_copy_with_disable_check_of_pre_and_post(self): 159s if sys.version_info < (3, 11): 159s self.skipTest("Instruction COPY does not exist before 3.11") 159s code = Bytecode() 159s code.first_lineno = 1 159s code.extend([Instr("LOAD_CONST", 1), Instr("COPY", 2)]) 159s > co = code.to_code(check_pre_and_post=False) 159s 159s tests/test_bytecode.py:619: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____ BytecodeTests.test_not_enough_swap_with_disable_check_of_pre_and_post _____ 159s 159s self = 159s 159s def test_not_enough_swap_with_disable_check_of_pre_and_post(self): 159s if sys.version_info < (3, 11): 159s self.skipTest("Instruction SWAP does not exist before 3.11") 159s code = Bytecode() 159s code.first_lineno = 1 159s code.extend([Instr("LOAD_CONST", 1), Instr("SWAP", 2)]) 159s > co = code.to_code(check_pre_and_post=False) 159s 159s tests/test_bytecode.py:637: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _________________________ BytecodeTests.test_setlineno _________________________ 159s 159s self = 159s 159s def test_setlineno(self): 159s # x = 7 159s # y = 8 159s # z = 9 159s code = Bytecode() 159s code.first_lineno = 3 159s code.extend( 159s [ 159s Instr("LOAD_CONST", 7), 159s Instr("STORE_NAME", "x"), 159s SetLineno(4), 159s Instr("LOAD_CONST", 8), 159s Instr("STORE_NAME", "y"), 159s SetLineno(5), 159s Instr("LOAD_CONST", 9), 159s Instr("STORE_NAME", "z"), 159s ] 159s ) 159s 159s > concrete = code.to_concrete_bytecode() 159s 159s tests/test_bytecode.py:330: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __________________________ BytecodeTests.test_to_code __________________________ 159s 159s self = 159s 159s def test_to_code(self): 159s code = Bytecode() 159s code.first_lineno = 50 159s code.extend( 159s [ 159s Instr("LOAD_NAME", "print"), 159s Instr("LOAD_CONST", "%s"), 159s Instr( 159s "LOAD_GLOBAL", (False, "a") if sys.version_info >= (3, 11) else "a" 159s ), 159s Instr("BINARY_OP", BinaryOp.ADD) 159s if sys.version_info >= (3, 11) 159s else Instr("BINARY_ADD"), 159s ] 159s # For 3.12+ we need a NULL before a CALL to a free function 159s + ([Instr("PUSH_NULL")] if sys.version_info >= (3, 12) else []) 159s + [ 159s # On 3.11 we should have a pre-call 159s Instr("CALL" if sys.version_info >= (3, 11) else "CALL_FUNCTION", 1), 159s Instr("RETURN_VALUE"), 159s ] 159s ) 159s > co = code.to_code() 159s 159s tests/test_bytecode.py:367: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 92 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________________ BytecodeBlocksTests.test_attr _________________________ 159s 159s self = 159s 159s def test_attr(self): 159s source = """ 159s first_line = 1 159s 159s def func(arg1, arg2, *, arg3): 159s x = 1 159s y = 2 159s return arg1 159s """ 159s > code = disassemble(source, filename="hello.py", function=True) 159s 159s tests/test_cfg.py:133: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:30: in disassemble 159s code = _disassemble(source, filename=filename, function=function) 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________________ BytecodeBlocksFunctionalTests.test_eq _____________________ 159s 159s self = 159s 159s def test_eq(self): 159s # compare codes with multiple blocks and labels, 159s # Code.__eq__() renumbers labels to get equal labels 159s source = "x = 1 if test else 2" 159s > code1 = disassemble(source) 159s 159s tests/test_cfg.py:480: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:30: in disassemble 159s code = _disassemble(source, filename=filename, function=function) 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________ BytecodeBlocksFunctionalTests.test_eq_with_try_except _____________ 159s 159s self = 159s 159s def test_eq_with_try_except(self): 159s source = "try:\n x = 1\nexcept Exception:\n pass\nfinally:\n print()" 159s > code1 = disassemble(source) 159s 159s tests/test_cfg.py:499: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:30: in disassemble 159s code = _disassemble(source, filename=filename, function=function) 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________ BytecodeBlocksFunctionalTests.test_split_block ________________ 159s 159s self = 159s 159s def test_split_block(self): 159s > code = self.sample_code() 159s 159s tests/test_cfg.py:528: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:517: in sample_code 159s code = disassemble("x = 1", remove_last_return_none=True) 159s tests/test_cfg.py:30: in disassemble 159s code = _disassemble(source, filename=filename, function=function) 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __________ BytecodeBlocksFunctionalTests.test_split_block_dont_split ___________ 159s 159s self = 159s 159s def test_split_block_dont_split(self): 159s > code = self.sample_code() 159s 159s tests/test_cfg.py:581: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:517: in sample_code 159s code = disassemble("x = 1", remove_last_return_none=True) 159s tests/test_cfg.py:30: in disassemble 159s code = _disassemble(source, filename=filename, function=function) 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ______________ BytecodeBlocksFunctionalTests.test_split_block_end ______________ 159s 159s self = 159s 159s def test_split_block_end(self): 159s > code = self.sample_code() 159s 159s tests/test_cfg.py:558: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:517: in sample_code 159s code = disassemble("x = 1", remove_last_return_none=True) 159s tests/test_cfg.py:30: in disassemble 159s code = _disassemble(source, filename=filename, function=function) 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _____________ BytecodeBlocksFunctionalTests.test_split_block_error _____________ 159s 159s self = 159s 159s def test_split_block_error(self): 159s > code = self.sample_code() 159s 159s tests/test_cfg.py:591: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:517: in sample_code 159s code = disassemble("x = 1", remove_last_return_none=True) 159s tests/test_cfg.py:30: in disassemble 159s code = _disassemble(source, filename=filename, function=function) 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __________________ BytecodeBlocksFunctionalTests.test_to_code __________________ 159s 159s self = 159s 159s def test_to_code(self): 159s # test resolution of jump labels 159s bytecode = ControlFlowGraph() 159s bytecode.first_lineno = 3 159s bytecode.argcount = 3 159s bytecode.posonlyargcount = 0 159s bytecode.kwonlyargcount = 2 159s bytecode.name = "func" 159s bytecode.filename = "hello.py" 159s bytecode.flags = 0x43 159s bytecode.argnames = ("arg", "arg2", "arg3", "kwonly", "kwonly2") 159s bytecode.docstring = None 159s block0 = bytecode[0] 159s block1 = bytecode.add_block() 159s block2 = bytecode.add_block() 159s block0.extend( 159s [ 159s Instr("LOAD_FAST", "x", lineno=4), 159s Instr( 159s "POP_JUMP_FORWARD_IF_FALSE" 159s if (3, 12) > sys.version_info >= (3, 11) 159s else "POP_JUMP_IF_FALSE", 159s block2, 159s lineno=4, 159s ), 159s ] 159s ) 159s block1.extend( 159s [Instr("LOAD_FAST", "arg", lineno=5), Instr("STORE_FAST", "x", lineno=5)] 159s ) 159s block2.extend( 159s [ 159s Instr("LOAD_CONST", 3, lineno=6), 159s Instr("STORE_FAST", "x", lineno=6), 159s Instr("LOAD_FAST", "x", lineno=7), 159s Instr("RETURN_VALUE", lineno=7), 159s ] 159s ) 159s 159s if sys.version_info >= (3, 11): 159s # jump is relative not absolute 159s expected = ( 159s b"|\x05" b"r\x02" b"|\x00" b"}\x05" b"d\x01" b"}\x05" b"|\x05" b"S\x00" 159s ) 159s elif OFFSET_AS_INSTRUCTION: 159s # The argument of the jump is divided by 2 159s expected = ( 159s b"|\x05" b"r\x04" b"|\x00" b"}\x05" b"d\x01" b"}\x05" b"|\x05" b"S\x00" 159s ) 159s else: 159s expected = ( 159s b"|\x05" b"r\x08" b"|\x00" b"}\x05" b"d\x01" b"}\x05" b"|\x05" b"S\x00" 159s ) 159s 159s > code = bytecode.to_code() 159s 159s tests/test_cfg.py:651: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/cfg.py:1057: in to_code 159s return bc.to_code( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 85 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _________ CFGStacksizeComputationTests.test_stack_size_computation_and _________ 159s 159s self = 159s 159s def test_stack_size_computation_and(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s return arg1 and args # Test JUMP_IF_FALSE_OR_POP 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:730: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __ CFGStacksizeComputationTests.test_stack_size_computation_for_loop_continue __ 159s 159s self = 159s 159s def test_stack_size_computation_for_loop_continue(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s for k in kwargs: 159s if k in args: 159s continue 159s else: 159s return 1 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:757: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _______ CFGStacksizeComputationTests.test_stack_size_computation_if_else _______ 159s 159s self = 159s 159s def test_stack_size_computation_if_else(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s if args: 159s return 0 159s elif kwargs: 159s return 1 159s else: 159s return 2 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:747: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _ CFGStacksizeComputationTests.test_stack_size_computation_nested_try_except_else_finally _ 159s 159s self = 159s 159s def test_stack_size_computation_nested_try_except_else_finally(self): 159s def test(*args, **kwargs): 159s try: 159s v = args[1] 159s except IndexError: 159s try: 159s w = kwargs["value"] 159s except KeyError: 159s return -1 159s else: 159s return w 159s finally: 159s print("second finally") 159s else: 159s return v 159s finally: 159s print("first finally") 159s 159s # A direct comparison of the stack depth fails because CPython 159s # generate dead code that is used in stack computation. 159s cpython_stacksize = test.__code__.co_stacksize 159s > test.__code__ = Bytecode.from_code(test.__code__).to_code() 159s 159s tests/test_cfg.py:856: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _ CFGStacksizeComputationTests.test_stack_size_computation_nested_try_except_finally _ 159s 159s self = 159s 159s def test_stack_size_computation_nested_try_except_finally(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s k = 1 159s try: 159s getattr(arg1, k) 159s except AttributeError: 159s pass 159s except Exception: 159s try: 159s assert False 159s except Exception: 159s return 2 159s finally: 159s print("unexpected") 159s finally: 159s print("attempted to get {}".format(k)) 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:833: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _________ CFGStacksizeComputationTests.test_stack_size_computation_or __________ 159s 159s self = 159s 159s def test_stack_size_computation_or(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s return arg1 or args # Test JUMP_IF_TRUE_OR_POP 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:736: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _____ CFGStacksizeComputationTests.test_stack_size_computation_try_except ______ 159s 159s self = 159s 159s def test_stack_size_computation_try_except(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s try: 159s return args[0] 159s except Exception: 159s return 2 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:781: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _ CFGStacksizeComputationTests.test_stack_size_computation_try_except_else_finally _ 159s 159s self = 159s 159s def test_stack_size_computation_try_except_else_finally(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s try: 159s return args[0] 159s except Exception: 159s return 2 159s else: 159s return arg1 159s finally: 159s print("Interrupt") 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:814: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _ CFGStacksizeComputationTests.test_stack_size_computation_try_except_finally __ 159s 159s self = 159s 159s def test_stack_size_computation_try_except_finally(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s try: 159s return args[0] 159s except Exception: 159s return 2 159s finally: 159s print("Interrupt") 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:801: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _____ CFGStacksizeComputationTests.test_stack_size_computation_try_finally _____ 159s 159s self = 159s 159s def test_stack_size_computation_try_finally(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s try: 159s return args[0] 159s finally: 159s return 2 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:790: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __ CFGStacksizeComputationTests.test_stack_size_computation_while_loop_break ___ 159s 159s self = 159s 159s def test_stack_size_computation_while_loop_break(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s while True: 159s if arg1: 159s break 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:765: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________ CFGStacksizeComputationTests.test_stack_size_computation_with _________ 159s 159s self = 159s 159s def test_stack_size_computation_with(self): 159s def test(arg1, *args, **kwargs): # pragma: no cover 159s with open(arg1) as f: 159s return f.read() 159s 159s > self.check_stack_size(test) 159s 159s tests/test_cfg.py:772: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:692: in check_stack_size 159s bytecode = Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _________ CFGStacksizeComputationTests.test_stack_size_with_dead_code __________ 159s 159s self = 159s 159s def test_stack_size_with_dead_code(self): 159s # Simply demonstrate more directly the previously mentioned issue. 159s def test(*args): # pragma: no cover 159s a = 0 159s return a 159s try: 159s a = args[0] 159s except IndexError: 159s return -1 159s else: 159s return a 159s 159s > test.__code__ = Bytecode.from_code(test.__code__).to_code() 159s 159s tests/test_cfg.py:882: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _________ CFGStacksizeComputationTests.test_stack_size_with_dead_code2 _________ 159s 159s self = 159s 159s def test_stack_size_with_dead_code2(self): 159s # See GH #118 159s source = """ 159s try: 159s pass 159s except Exception as e: 159s pass 159s """ 159s source = textwrap.dedent(source).strip() 159s code = compile(source, "", "exec") 159s > bytecode = Bytecode.from_code(code) 159s 159s tests/test_cfg.py:896: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _______________ CFGRoundTripTests.test_cellvar_freevar_roundtrip _______________ 159s 159s self = 159s 159s def test_cellvar_freevar_roundtrip(self): 159s from . import cell_free_vars_cases as cfc 159s 159s def recompile_code_and_inner(code): 159s cfg = ControlFlowGraph.from_bytecode(Bytecode.from_code(code)) 159s for block in cfg: 159s for instr in block: 159s if isinstance(instr.arg, types.CodeType): 159s instr.arg = recompile_code_and_inner(instr.arg) 159s as_code = cfg.to_code() 159s self.assertCodeObjectEqual(code, as_code) 159s return as_code 159s 159s for f in cfc.TEST_CASES: 159s print(f.__name__) 159s with self.subTest(f.__name__): 159s origin = f.__code__ 159s > f.__code__ = recompile_code_and_inner(origin) 159s 159s tests/test_cfg.py:980: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_cfg.py:967: in recompile_code_and_inner 159s cfg = ControlFlowGraph.from_bytecode(Bytecode.from_code(code)) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 94 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ----------------------------- Captured stdout call ----------------------------- 159s simple_cellvar 159s _____________ CFGRoundTripTests.test_roundtrip_exception_handling ______________ 159s 159s self = 159s 159s def test_roundtrip_exception_handling(self): 159s from . import exception_handling_cases as ehc 159s 159s for f in ehc.TEST_CASES: 159s # 3.12 use one less exception table entry causing to optimize this case 159s # less than we could otherwise 159s if sys.version_info >= (3, 12) and f.__name__ == "try_except_finally": 159s continue 159s print(f.__name__) 159s with self.subTest(f.__name__): 159s origin = f.__code__ 159s print("Bytecode:") 159s > bytecode = Bytecode.from_code( 159s f.__code__, conserve_exception_block_stackdepth=True 159s ) 159s 159s tests/test_cfg.py:947: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ----------------------------- Captured stdout call ----------------------------- 159s try_except_group 159s Bytecode: 159s __________________________ CodeTests.test_async_func ___________________________ 159s 159s self = 159s 159s def test_async_func(self): 159s > self.check( 159s """ 159s async def func(arg, arg2): 159s pass 159s """, 159s function=True, 159s ) 159s 159s tests/test_code.py:79: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_code.py:14: in check 159s code = ConcreteBytecode.from_code(ref_code).to_code() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 35 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________________ CodeTests.test_generator_func _________________________ 159s 159s self = 159s 159s def test_generator_func(self): 159s > self.check( 159s """ 159s def func(arg, arg2): 159s yield 159s """, 159s function=True, 159s ) 159s 159s tests/test_code.py:70: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_code.py:14: in check 159s code = ConcreteBytecode.from_code(ref_code).to_code() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 35 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________________________ CodeTests.test_kwargs _____________________________ 159s 159s self = 159s 159s def test_kwargs(self): 159s > self.check( 159s """ 159s def func(a, b, **kwargs): 159s pass 159s """, 159s function=True, 159s ) 159s 159s tests/test_code.py:50: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_code.py:14: in check 159s code = ConcreteBytecode.from_code(ref_code).to_code() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __________________________ CodeTests.test_kwonlyargs ___________________________ 159s 159s self = 159s 159s def test_kwonlyargs(self): 159s > self.check( 159s """ 159s def func(*, arg, arg2): 159s pass 159s """, 159s function=True, 159s ) 159s 159s tests/test_code.py:59: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_code.py:14: in check 159s code = ConcreteBytecode.from_code(ref_code).to_code() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _____________________________ CodeTests.test_loop ______________________________ 159s 159s self = 159s 159s def test_loop(self): 159s > self.check( 159s """ 159s for x in range(1, 10): 159s x += 1 159s if x == 3: 159s continue 159s x -= 1 159s if x > 7: 159s break 159s x = 0 159s print(x) 159s """ 159s ) 159s 159s tests/test_code.py:26: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_code.py:14: in check 159s code = ConcreteBytecode.from_code(ref_code).to_code() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________________________ CodeTests.test_varargs ____________________________ 159s 159s self = 159s 159s def test_varargs(self): 159s > self.check( 159s """ 159s def func(a, b, *varargs): 159s pass 159s """, 159s function=True, 159s ) 159s 159s tests/test_code.py:41: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_code.py:14: in check 159s code = ConcreteBytecode.from_code(ref_code).to_code() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _______________________ ConcreteInstrTests.test_assemble _______________________ 159s 159s self = 159s 159s def test_assemble(self): 159s instr = ConcreteInstr("NOP") 159s > self.assertEqual(instr.assemble(), b"\t\x00") 159s E AssertionError: b'\x1e\x00' != b'\t\x00' 159s 159s tests/test_concrete.py:146: AssertionError 159s _________________________ ConcreteInstrTests.test_attr _________________________ 159s 159s self = 159s 159s def test_attr(self): 159s instr = ConcreteInstr("LOAD_CONST", 5, lineno=12) 159s self.assertEqual(instr.name, "LOAD_CONST") 159s > self.assertEqual(instr.opcode, 100) 159s E AssertionError: 83 != 100 159s 159s tests/test_concrete.py:63: AssertionError 159s _____________________ ConcreteInstrTests.test_disassemble ______________________ 159s 159s self = 159s 159s def test_disassemble(self): 159s code = b"\t\x00d\x03" 159s instr = ConcreteInstr.disassemble(1, code, 0) 159s > self.assertEqual(instr, ConcreteInstr("NOP", lineno=1)) 159s E AssertionError: != 159s 159s tests/test_concrete.py:134: AssertionError 159s ___________________ ConcreteInstrTests.test_get_jump_target ____________________ 159s 159s self = 159s 159s def test_get_jump_target(self): 159s if sys.version_info < (3, 11): 159s jump_abs = ConcreteInstr("JUMP_ABSOLUTE", 3) 159s self.assertEqual(jump_abs.get_jump_target(100), 3) 159s 159s jump_forward = ConcreteInstr("JUMP_FORWARD", 5) 159s self.assertEqual( 159s > jump_forward.get_jump_target(10), 16 if OFFSET_AS_INSTRUCTION else 17 159s ) 159s 159s tests/test_concrete.py:170: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 79 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _______________________ ConcreteInstrTests.test_set_attr _______________________ 159s 159s self = 159s 159s def test_set_attr(self): 159s instr = ConcreteInstr("LOAD_CONST", 5, lineno=12) 159s 159s # operator name 159s instr.name = "LOAD_FAST" 159s self.assertEqual(instr.name, "LOAD_FAST") 159s > self.assertEqual(instr.opcode, 124) 159s E AssertionError: 85 != 124 159s 159s tests/test_concrete.py:93: AssertionError 159s ______________________ ConcreteBytecodeTests.test_cellvar ______________________ 159s 159s self = 159s 159s def test_cellvar(self): 159s concrete = ConcreteBytecode() 159s concrete.cellvars = ["x"] 159s concrete.append(ConcreteInstr("LOAD_DEREF", 0)) 159s > code = concrete.to_code() 159s 159s tests/test_concrete.py:469: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 84 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __________________ ConcreteBytecodeTests.test_cellvar_freevar __________________ 159s 159s self = 159s 159s def test_cellvar_freevar(self): 159s concrete = ConcreteBytecode() 159s concrete.cellvars = ["cell"] 159s concrete.freevars = ["free"] 159s concrete.append(ConcreteInstr("LOAD_DEREF", 0)) 159s concrete.append(ConcreteInstr("LOAD_DEREF", 1)) 159s > code = concrete.to_code() 159s 159s tests/test_concrete.py:509: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 84 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________________ ConcreteBytecodeTests.test_eq _________________________ 159s 159s self = 159s 159s def test_eq(self): 159s code = ConcreteBytecode() 159s self.assertFalse(code == 1) 159s 159s for name, val in ( 159s ("names", ["a"]), 159s ("varnames", ["a"]), 159s ("consts", [1]), 159s ("argcount", 1), 159s ("kwonlyargcount", 2), 159s ("flags", CompilerFlags(CompilerFlags.GENERATOR)), 159s ("first_lineno", 10), 159s ("filename", "xxxx.py"), 159s ("name", "__x"), 159s ("docstring", "x-x-x"), 159s ("cellvars", [CellVar("x")]), 159s ("freevars", [FreeVar("x")]), 159s ): 159s c = ConcreteBytecode() 159s setattr(c, name, val) 159s # For obscure reasons using assertNotEqual here fail 159s self.assertFalse(code == c) 159s 159s c = ConcreteBytecode() 159s c.posonlyargcount = 10 159s self.assertFalse(code == c) 159s 159s c = ConcreteBytecode() 159s c.consts = [1] 159s code.consts = [1] 159s c.append(ConcreteInstr("LOAD_CONST", 0)) 159s > self.assertFalse(code == c) 159s 159s tests/test_concrete.py:225: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:320: in __eq__ 159s return super().__eq__(other) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:91: in __eq__ 159s if self.compute_stacksize() != other.compute_stacksize(): 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:846: in compute_stacksize 159s bytecode = self.to_bytecode() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________ ConcreteBytecodeTests.test_explicit_stacksize _________________ 159s 159s self = 159s 159s def test_explicit_stacksize(self): 159s # Passing stacksize=... to ConcreteBytecode.to_code should result in a 159s # code object with the specified stacksize. We pass some silly values 159s # and assert that they are honored. 159s code_obj = get_code("print('%s' % (a,b,c))") 159s original_stacksize = code_obj.co_stacksize 159s concrete = ConcreteBytecode.from_code(code_obj) 159s 159s # First with something bigger than necessary. 159s explicit_stacksize = original_stacksize + 42 159s new_code_obj = concrete.to_code( 159s stacksize=explicit_stacksize, compute_exception_stack_depths=False 159s ) 159s self.assertEqual(new_code_obj.co_stacksize, explicit_stacksize) 159s 159s # Then with something bogus. We probably don't want to advertise this 159s # in the documentation. If this fails then decide if it's for good 159s # reason, and remove if so. 159s explicit_stacksize = 0 159s new_code_obj = concrete.to_code( 159s stacksize=explicit_stacksize, compute_exception_stack_depths=False 159s ) 159s > self.assertEqual(new_code_obj.co_stacksize, explicit_stacksize) 159s E AssertionError: 1 != 0 159s 159s tests/test_concrete.py:614: AssertionError 159s __________________ ConcreteBytecodeTests.test_extended_lnotab __________________ 159s 159s self = 159s 159s def test_extended_lnotab(self): 159s # x = 7 159s # 200 blank lines 159s # y = 8 159s concrete = ConcreteBytecode( 159s [ 159s ConcreteInstr("LOAD_CONST", 0), 159s SetLineno(1 + 128), 159s ConcreteInstr("STORE_NAME", 0), 159s # line number goes backward! 159s SetLineno(1 + 129), 159s ConcreteInstr("LOAD_CONST", 1), 159s SetLineno(1), 159s ConcreteInstr("STORE_NAME", 1), 159s ] 159s ) 159s concrete.consts = [7, 8] 159s concrete.names = ["x", "y"] 159s concrete.first_lineno = 1 159s 159s > code = concrete.to_code() 159s 159s tests/test_concrete.py:365: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _________________ ConcreteBytecodeTests.test_extended_lnotab2 __________________ 159s 159s self = 159s 159s def test_extended_lnotab2(self): 159s # x = 7 159s # 200 blank lines 159s # y = 8 159s base_code = compile("x = 7" + "\n" * 200 + "y = 8", "", "exec") 159s concrete = ConcreteBytecode( 159s ( 159s [ConcreteInstr("RESUME", 0, lineno=0), SetLineno(1)] 159s if sys.version_info >= (3, 11) 159s else [] 159s ) 159s + [ 159s ConcreteInstr("LOAD_CONST", 0), 159s ConcreteInstr("STORE_NAME", 0), 159s SetLineno(201), 159s ConcreteInstr("LOAD_CONST", 1), 159s ConcreteInstr("STORE_NAME", 1), 159s ] 159s + ( 159s [ConcreteInstr("RETURN_CONST", 2)] 159s if sys.version_info >= (3, 12) 159s else [ 159s ConcreteInstr("LOAD_CONST", 2), 159s ConcreteInstr("RETURN_VALUE"), 159s ] 159s ) 159s ) 159s concrete.consts = [None, 7, 8] 159s concrete.names = ["x", "y"] 159s concrete.first_lineno = 1 159s 159s > code = concrete.to_code() 159s 159s tests/test_concrete.py:415: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ______________________ ConcreteBytecodeTests.test_freevar ______________________ 159s 159s self = 159s 159s def test_freevar(self): 159s concrete = ConcreteBytecode() 159s concrete.freevars = ["x"] 159s concrete.append(ConcreteInstr("LOAD_DEREF", 0)) 159s > code = concrete.to_code() 159s 159s tests/test_concrete.py:488: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 84 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __________________ ConcreteBytecodeTests.test_load_classderef __________________ 159s 159s self = 159s 159s def test_load_classderef(self): 159s i_name = ( 159s "LOAD_FROM_DICT_OR_DEREF" 159s if sys.version_info >= (3, 12) 159s else "LOAD_CLASSDEREF" 159s ) 159s i_arg = 2 if sys.version_info >= (3, 11) else 1 159s concrete = ConcreteBytecode() 159s concrete.varnames = ["a"] 159s concrete.cellvars = ["__class__"] 159s concrete.freevars = ["__class__"] 159s concrete.extend( 159s [ 159s ConcreteInstr("LOAD_FAST", 0, lineno=1), 159s ConcreteInstr(i_name, i_arg, lineno=1), 159s ConcreteInstr("STORE_DEREF", i_arg, lineno=1), 159s ] 159s ) 159s 159s > bytecode = concrete.to_bytecode() 159s 159s tests/test_concrete.py:551: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 85 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __________________ ConcreteBytecodeTests.test_negative_lnotab __________________ 159s 159s self = 159s 159s def test_negative_lnotab(self): 159s # x = 7 159s # y = 8 159s concrete = ConcreteBytecode( 159s [ 159s ConcreteInstr("LOAD_CONST", 0), 159s ConcreteInstr("STORE_NAME", 0), 159s # line number goes backward! 159s SetLineno(2), 159s ConcreteInstr("LOAD_CONST", 1), 159s ConcreteInstr("STORE_NAME", 1), 159s ] 159s ) 159s concrete.consts = [7, 8] 159s concrete.names = ["x", "y"] 159s concrete.first_lineno = 5 159s 159s > code = concrete.to_code() 159s 159s tests/test_concrete.py:337: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________ ConcreteBytecodeTests.test_to_bytecode_consts _________________ 159s 159s self = 159s 159s def test_to_bytecode_consts(self): 159s # x = -0.0 159s # x = +0.0 159s # 159s # code optimized by the CPython 3.6 peephole optimizer which emits 159s # duplicated constants (0.0 is twice in consts). 159s code = ConcreteBytecode() 159s code.consts = [0.0, None, -0.0, 0.0] 159s code.names = ["x", "y"] 159s code.extend( 159s [ 159s ConcreteInstr("LOAD_CONST", 2, lineno=1), 159s ConcreteInstr("STORE_NAME", 0, lineno=1), 159s ConcreteInstr("LOAD_CONST", 3, lineno=2), 159s ConcreteInstr("STORE_NAME", 1, lineno=2), 159s ConcreteInstr("LOAD_CONST", 1, lineno=2), 159s ConcreteInstr("RETURN_VALUE", lineno=2), 159s ] 159s ) 159s 159s > code = code.to_bytecode().to_concrete_bytecode() 159s 159s tests/test_concrete.py:448: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __________________ ConcreteBytecodeTests.test_to_code_lnotab ___________________ 159s 159s self = 159s 159s def test_to_code_lnotab(self): 159s # We use an actual function for the simple case to 159s # ensure we get lnotab right 159s def f(): 159s # 159s # 159s x = 7 # noqa 159s y = 8 # noqa 159s z = 9 # noqa 159s 159s fl = f.__code__.co_firstlineno 159s concrete = ConcreteBytecode() 159s concrete.consts = [None, 7, 8, 9] 159s concrete.varnames = ["x", "y", "z"] 159s concrete.first_lineno = fl 159s concrete.extend( 159s ( 159s [ConcreteInstr("RESUME", 0), SetLineno(1)] 159s if sys.version_info >= (3, 11) 159s else [] 159s ) 159s + [ 159s SetLineno(fl + 3), 159s ConcreteInstr("LOAD_CONST", 1), 159s ConcreteInstr("STORE_FAST", 0), 159s SetLineno(fl + 4), 159s ConcreteInstr("LOAD_CONST", 2), 159s ConcreteInstr("STORE_FAST", 1), 159s SetLineno(fl + 5), 159s ConcreteInstr("LOAD_CONST", 3), 159s ConcreteInstr("STORE_FAST", 2), 159s ] 159s + ( 159s [ConcreteInstr("RETURN_CONST", 0)] 159s if sys.version_info >= (3, 12) 159s else [ 159s ConcreteInstr("LOAD_CONST", 0), 159s ConcreteInstr("RETURN_VALUE"), 159s ] 159s ) 159s ) 159s 159s > code = concrete.to_code() 159s 159s tests/test_concrete.py:308: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _____________ ConcreteFromCodeTests.test_cellvar_freevar_roundtrip _____________ 159s 159s self = 159s 159s def test_cellvar_freevar_roundtrip(self): 159s from . import cell_free_vars_cases as cfc 159s 159s def recompile_code_and_inner(code): 159s concrete = ConcreteBytecode.from_code(code) 159s for i, c in enumerate(concrete.consts): 159s if isinstance(c, types.CodeType): 159s concrete.consts[i] = recompile_code_and_inner(c) 159s as_code = concrete.to_code( 159s stacksize=code.co_stacksize, compute_exception_stack_depths=False 159s ) 159s self.assertCodeObjectEqual(code, as_code) 159s return as_code 159s 159s for f in cfc.TEST_CASES: 159s print(f.__name__) 159s with self.subTest(f.__name__): 159s origin = f.__code__ 159s > f.__code__ = recompile_code_and_inner(origin) 159s 159s tests/test_concrete.py:1323: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/test_concrete.py:1312: in recompile_code_and_inner 159s concrete.consts[i] = recompile_code_and_inner(c) 159s tests/test_concrete.py:1316: in recompile_code_and_inner 159s self.assertCodeObjectEqual(code, as_code) 159s tests/__init__.py:171: in assertCodeObjectEqual 159s self.assertSequenceEqual( 159s E AssertionError: Sequences differ: [(Non[63 chars], 19, 20), (25, 25, 15, 20), (25, 25, 15, 20), (25, 25, 8, 20)] != [(Non[63 chars], 19, 20), (25, 25, 15, 20), (25, 25, 8, 20)] 159s E 159s E First differing element 5: 159s E (25, 25, 15, 20) 159s E (25, 25, 8, 20) 159s E 159s E First sequence contains 1 additional elements. 159s E First extra element 6: 159s E (25, 25, 8, 20) 159s E 159s E [(None, None, None, None), 159s E (24, 24, 0, 0), 159s E (25, 25, 15, 16), 159s E (25, 25, 19, 20), 159s E (25, 25, 15, 20), 159s E - (25, 25, 15, 20), 159s E (25, 25, 8, 20)] 159s ----------------------------- Captured stdout call ----------------------------- 159s simple_cellvar 159s cellvar_share_name 159s cellvar_shared_and_unshared 159s ____________ ConcreteFromCodeTests.test_exception_table_round_trip _____________ 159s 159s self = 159s 159s def test_exception_table_round_trip(self): 159s from . import exception_handling_cases as ehc 159s 159s for f in ehc.TEST_CASES: 159s print(f.__name__) 159s with self.subTest(f.__name__): 159s origin = f.__code__ 159s concrete = ConcreteBytecode.from_code(f.__code__) 159s as_code = concrete.to_code( 159s stacksize=f.__code__.co_stacksize, 159s compute_exception_stack_depths=False, 159s ) 159s > self.assertCodeObjectEqual(origin, as_code) 159s 159s tests/test_concrete.py:1297: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/__init__.py:171: in assertCodeObjectEqual 159s self.assertSequenceEqual( 159s E AssertionError: Sequences differ: [(2, [157 chars] (5, 5, 12, 22), (5, 5, 12, 22), (5, 5, 12, 22[783 chars]one)] != [(2, [157 chars] (5, 6, 4, 21), (5, 6, 4, 21), (5, 6, 4, 21), [566 chars]one)] 159s E 159s E First differing element 10: 159s E (5, 5, 12, 22) 159s E (5, 6, 4, 21) 159s E 159s E First sequence contains 13 additional elements. 159s E First extra element 40: 159s E (None, None, None, None) 159s E 159s E Diff is 1155 characters long. Set self.maxDiff to None to see it. 159s ----------------------------- Captured stdout call ----------------------------- 159s try_except_group 159s ___________ ConcreteFromCodeTests.test_expected_arg_with_many_consts ___________ 159s 159s self = 159s 159s def test_expected_arg_with_many_consts(self): 159s def test(): 159s var = 0 159s var = 1 159s var = 2 159s var = 3 159s var = 4 159s var = 5 159s var = 6 159s var = 7 159s var = 8 159s var = 9 159s var = 10 159s var = 11 159s var = 12 159s var = 13 159s var = 14 159s var = 15 159s var = 16 159s var = 17 159s var = 18 159s var = 19 159s var = 20 159s var = 21 159s var = 22 159s var = 23 159s var = 24 159s var = 25 159s var = 26 159s var = 27 159s var = 28 159s var = 29 159s var = 30 159s var = 31 159s var = 32 159s var = 33 159s var = 34 159s var = 35 159s var = 36 159s var = 37 159s var = 38 159s var = 39 159s var = 40 159s var = 41 159s var = 42 159s var = 43 159s var = 44 159s var = 45 159s var = 46 159s var = 47 159s var = 48 159s var = 49 159s var = 50 159s var = 51 159s var = 52 159s var = 53 159s var = 54 159s var = 55 159s var = 56 159s var = 57 159s var = 58 159s var = 59 159s var = 60 159s var = 61 159s var = 62 159s var = 63 159s var = 64 159s var = 65 159s var = 66 159s var = 67 159s var = 68 159s var = 69 159s var = 70 159s var = 71 159s var = 72 159s var = 73 159s var = 74 159s var = 75 159s var = 76 159s var = 77 159s var = 78 159s var = 79 159s var = 80 159s var = 81 159s var = 82 159s var = 83 159s var = 84 159s var = 85 159s var = 86 159s var = 87 159s var = 88 159s var = 89 159s var = 90 159s var = 91 159s var = 92 159s var = 93 159s var = 94 159s var = 95 159s var = 96 159s var = 97 159s var = 98 159s var = 99 159s var = 100 159s var = 101 159s var = 102 159s var = 103 159s var = 104 159s var = 105 159s var = 106 159s var = 107 159s var = 108 159s var = 109 159s var = 110 159s var = 111 159s var = 112 159s var = 113 159s var = 114 159s var = 115 159s var = 116 159s var = 117 159s var = 118 159s var = 119 159s var = 120 159s var = 121 159s var = 122 159s var = 123 159s var = 124 159s var = 125 159s var = 126 159s var = 127 159s var = 128 159s var = 129 159s var = 130 159s var = 131 159s var = 132 159s var = 133 159s var = 134 159s var = 135 159s var = 136 159s var = 137 159s var = 138 159s var = 139 159s var = 140 159s var = 141 159s var = 142 159s var = 143 159s var = 144 159s var = 145 159s var = 146 159s var = 147 159s var = 148 159s var = 149 159s var = 150 159s var = 151 159s var = 152 159s var = 153 159s var = 154 159s var = 155 159s var = 156 159s var = 157 159s var = 158 159s var = 159 159s var = 160 159s var = 161 159s var = 162 159s var = 163 159s var = 164 159s var = 165 159s var = 166 159s var = 167 159s var = 168 159s var = 169 159s var = 170 159s var = 171 159s var = 172 159s var = 173 159s var = 174 159s var = 175 159s var = 176 159s var = 177 159s var = 178 159s var = 179 159s var = 180 159s var = 181 159s var = 182 159s var = 183 159s var = 184 159s var = 185 159s var = 186 159s var = 187 159s var = 188 159s var = 189 159s var = 190 159s var = 191 159s var = 192 159s var = 193 159s var = 194 159s var = 195 159s var = 196 159s var = 197 159s var = 198 159s var = 199 159s var = 200 159s var = 201 159s var = 202 159s var = 203 159s var = 204 159s var = 205 159s var = 206 159s var = 207 159s var = 208 159s var = 209 159s var = 210 159s var = 211 159s var = 212 159s var = 213 159s var = 214 159s var = 215 159s var = 216 159s var = 217 159s var = 218 159s var = 219 159s var = 220 159s var = 221 159s var = 222 159s var = 223 159s var = 224 159s var = 225 159s var = 226 159s var = 227 159s var = 228 159s var = 229 159s var = 230 159s var = 231 159s var = 232 159s var = 233 159s var = 234 159s var = 235 159s var = 236 159s var = 237 159s var = 238 159s var = 239 159s var = 240 159s var = 241 159s var = 242 159s var = 243 159s var = 244 159s var = 245 159s var = 246 159s var = 247 159s var = 248 159s var = 249 159s var = 250 159s var = 251 159s var = 252 159s var = 253 159s var = 254 159s var = 255 159s var = 256 159s var = 257 159s var = 258 159s var = 259 159s 159s return var 159s 159s test.__code__ = ConcreteBytecode.from_code( 159s test.__code__, extended_arg=True 159s > ).to_code() 159s 159s tests/test_concrete.py:1187: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________ ConcreteFromCodeTests.test_extended_arg_make_function _____________ 159s 159s self = 159s 159s def test_extended_arg_make_function(self): 159s if (3, 9) <= sys.version_info < (3, 10): 159s from .util_annotation import get_code as get_code_future 159s 159s code_obj = get_code_future( 159s """ 159s def foo(x: int, y: int): 159s pass 159s """ 159s ) 159s else: 159s code_obj = get_code( 159s """ 159s def foo(x: int, y: int): 159s pass 159s """ 159s ) 159s 159s # without EXTENDED_ARG 159s concrete = ConcreteBytecode.from_code(code_obj) 159s if sys.version_info >= (3, 11): 159s func_code = concrete.consts[2] 159s names = ["int", "foo"] 159s consts = ["x", "y", func_code, None] 159s const_offset = 1 159s name_offset = 1 159s first_instrs = [ 159s ConcreteInstr("LOAD_CONST", 0, lineno=1), 159s ConcreteInstr("LOAD_NAME", 0, lineno=1), 159s ConcreteInstr("LOAD_CONST", 1, lineno=1), 159s ConcreteInstr("LOAD_NAME", 0, lineno=1), 159s ConcreteInstr("BUILD_TUPLE", 4, lineno=1), 159s ] 159s elif sys.version_info >= (3, 10): 159s func_code = concrete.consts[2] 159s names = ["int", "foo"] 159s consts = ["x", "y", func_code, "foo", None] 159s const_offset = 1 159s name_offset = 1 159s first_instrs = [ 159s ConcreteInstr("LOAD_CONST", 0, lineno=1), 159s ConcreteInstr("LOAD_NAME", 0, lineno=1), 159s ConcreteInstr("LOAD_CONST", 1, lineno=1), 159s ConcreteInstr("LOAD_NAME", 0, lineno=1), 159s ConcreteInstr("BUILD_TUPLE", 4, lineno=1), 159s ] 159s elif ( 159s sys.version_info >= (3, 7) 159s and concrete.flags & CompilerFlags.FUTURE_ANNOTATIONS 159s ): 159s func_code = concrete.consts[2] 159s names = ["foo"] 159s consts = ["int", ("x", "y"), func_code, "foo", None] 159s const_offset = 1 159s name_offset = 0 159s first_instrs = [ 159s ConcreteInstr("LOAD_CONST", 0, lineno=1), 159s ConcreteInstr("LOAD_CONST", 0, lineno=1), 159s ConcreteInstr("LOAD_CONST", 0 + const_offset, lineno=1), 159s ConcreteInstr("BUILD_CONST_KEY_MAP", 2, lineno=1), 159s ] 159s else: 159s func_code = concrete.consts[1] 159s names = ["int", "foo"] 159s consts = [("x", "y"), func_code, "foo", None] 159s const_offset = 0 159s name_offset = 1 159s first_instrs = [ 159s ConcreteInstr("LOAD_NAME", 0, lineno=1), 159s ConcreteInstr("LOAD_NAME", 0, lineno=1), 159s ConcreteInstr("LOAD_CONST", 0 + const_offset, lineno=1), 159s ConcreteInstr("BUILD_CONST_KEY_MAP", 2, lineno=1), 159s ] 159s 159s self.assertSequenceEqual(concrete.names, names) 159s self.assertSequenceEqual(concrete.consts, consts) 159s expected = ( 159s first_instrs 159s + [ 159s ConcreteInstr("LOAD_CONST", 1 + const_offset, lineno=1), 159s ConcreteInstr("LOAD_CONST", 2 + const_offset, lineno=1), 159s > ConcreteInstr("MAKE_FUNCTION", 4, lineno=1), 159s ConcreteInstr("STORE_NAME", name_offset, lineno=1), 159s ] 159s + ( 159s [ConcreteInstr("RETURN_CONST", 3 + const_offset, lineno=1)] 159s if sys.version_info >= (3, 12) 159s else [ 159s ConcreteInstr("LOAD_CONST", 3 + const_offset, lineno=1), 159s ConcreteInstr("RETURN_VALUE", lineno=1), 159s ] 159s ) 159s ) 159s 159s tests/test_concrete.py:816: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:99: in __init__ 159s super().__init__(name, arg, lineno=lineno, location=location, offset=offset) 159s /usr/lib/python3/dist-packages/bytecode/instr.py:537: in __init__ 159s self._set(name, arg) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:120: in _set 159s super()._set(name, arg) 159s /usr/lib/python3/dist-packages/bytecode/instr.py:747: in _set 159s self._check_arg(name, opcode, arg) 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = <[AttributeError("'bytecode.concrete.ConcreteInstr' object has no attribute '_arg'") raised in repr()] ConcreteInstr object at 0xf41c3dbe4760> 159s name = 'MAKE_FUNCTION', opcode = 26, arg = 4 159s 159s def _check_arg(self, name: str, opcode: int, arg: int) -> None: 159s if opcode_has_argument(opcode): 159s if arg is UNSET: 159s raise ValueError("operation %s requires an argument" % name) 159s 159s _check_arg_int(arg, name) 159s # opcode == 0 corresponds to CACHE instruction in 3.11+ and was unused before 159s elif opcode == 0: 159s arg = arg if arg is not UNSET else 0 159s _check_arg_int(arg, name) 159s else: 159s if arg is not UNSET: 159s > raise ValueError("operation %s has no argument" % name) 159s E ValueError: operation MAKE_FUNCTION has no argument 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:113: ValueError 159s _________________ ConcreteFromCodeTests.test_extended_arg_nop __________________ 159s 159s self = 159s 159s def test_extended_arg_nop(self): 159s constants = [None] * (0x000129 + 1) 159s constants[0x000129] = "Arbitrary String" 159s # EXTENDED_ARG 0x01, NOP 0xFF, EXTENDED_ARG 0x01, 159s # LOAD_CONST 0x29, RETURN_VALUE 0x00 159s codestring = bytes([0x90, 0x01, 0x09, 0xFF, 0x90, 0x01, 0x64, 0x29, 0x53, 0x00]) 159s codetype_list = [ 159s 0, 159s 0, 159s 0, 159s 1, 159s 64, 159s codestring, 159s tuple(constants), 159s (), 159s (), 159s "", 159s "code", 159s 1, 159s b"", 159s (), 159s (), 159s ] 159s if sys.version_info >= (3, 8): 159s codetype_list.insert(1, 0) 159s if sys.version_info >= (3, 11): 159s codetype_list.insert(12, "code") 159s codetype_list.insert(14, bytes()) 159s codetype_args = tuple(codetype_list) 159s code = types.CodeType(*codetype_args) 159s # Check it can be encoded and decoded 159s > codetype_output = Bytecode.from_code(code).to_code().co_consts 159s 159s tests/test_concrete.py:888: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 0 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ______________ ConcreteFromCodeTests.test_extended_arg_unpack_ex _______________ 159s 159s self = 159s 159s def test_extended_arg_unpack_ex(self): 159s def test(): 159s p = [1, 2, 3, 4, 5, 6] 159s q, r, *s, t = p 159s return q, r, s, t 159s 159s cpython_stacksize = test.__code__.co_stacksize 159s test.__code__ = ConcreteBytecode.from_code( 159s test.__code__, extended_arg=True 159s > ).to_code() 159s 159s tests/test_concrete.py:916: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ______________ ConcreteFromCodeTests.test_fail_extended_arg_jump _______________ 159s 159s self = 159s 159s def test_fail_extended_arg_jump(self): 159s def test(): 159s var = None 159s for _ in range(0, 1): 159s var = 0 159s var = 1 159s var = 2 159s var = 3 159s var = 4 159s var = 5 159s var = 6 159s var = 7 159s var = 8 159s var = 9 159s var = 10 159s var = 11 159s var = 12 159s var = 13 159s var = 14 159s var = 15 159s var = 16 159s var = 17 159s var = 18 159s var = 19 159s var = 20 159s var = 21 159s var = 22 159s var = 23 159s var = 24 159s var = 25 159s var = 26 159s var = 27 159s var = 28 159s var = 29 159s var = 30 159s var = 31 159s var = 32 159s var = 33 159s var = 34 159s var = 35 159s var = 36 159s var = 37 159s var = 38 159s var = 39 159s var = 40 159s var = 41 159s var = 42 159s var = 43 159s var = 44 159s var = 45 159s var = 46 159s var = 47 159s var = 48 159s var = 49 159s var = 50 159s var = 51 159s var = 52 159s var = 53 159s var = 54 159s var = 55 159s var = 56 159s var = 57 159s var = 58 159s var = 59 159s var = 60 159s var = 61 159s var = 62 159s var = 63 159s var = 64 159s var = 65 159s var = 66 159s var = 67 159s var = 68 159s var = 69 159s var = 70 159s return var 159s 159s # Generate the bytecode with extended arguments 159s bytecode = ConcreteBytecode.from_code(test.__code__, extended_arg=True) 159s > bytecode.to_code() 159s 159s tests/test_concrete.py:1270: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ___________________ ConcreteFromCodeTests.test_packing_lines ___________________ 159s 159s self = 159s 159s def test_packing_lines(self): 159s import dis 159s 159s from .long_lines_example import long_lines 159s 159s line_starts = list(dis.findlinestarts(long_lines.__code__)) 159s 159s concrete = ConcreteBytecode.from_code(long_lines.__code__) 159s > as_code = concrete.to_code() 159s 159s tests/test_concrete.py:1282: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________________ BytecodeToConcreteTests.test_cellvars _____________________ 159s 159s self = 159s 159s def test_cellvars(self): 159s code = Bytecode() 159s code.cellvars = ["x"] 159s code.freevars = ["y"] 159s code.extend( 159s [ 159s Instr("LOAD_DEREF", CellVar("x"), lineno=1), 159s Instr("LOAD_DEREF", FreeVar("y"), lineno=1), 159s ] 159s ) 159s > concrete = code.to_concrete_bytecode() 159s 159s tests/test_concrete.py:1604: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 84 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________ BytecodeToConcreteTests.test_compute_jumps_convergence ____________ 159s 159s self = 159s 159s def test_compute_jumps_convergence(self): 159s # Consider the following sequence of instructions: 159s # 159s # JUMP_FORWARD Label1 159s # JUMP_FORWARD Label2 159s # ...126 instructions... 159s # Label1: Offset 254 on first pass, 256 second pass 159s # NOP 159s # ... many more instructions ... 159s # Label2: Offset > 256 on first pass 159s # 159s # On first pass of compute_jumps(), Label2 will be at address 254, so 159s # that value encodes into the single byte arg of JUMP_ABSOLUTE. 159s # 159s # On second pass compute_jumps() the instr at Label1 will have offset 159s # of 256 so will also be given an EXTENDED_ARG. 159s # 159s # Thus we need to make an additional pass. This test only verifies 159s # case where 2 passes is insufficient but three is enough. 159s # 159s # On Python > 3.10 we need to double the number since the offset is now 159s # in term of instructions and not bytes. 159s 159s # Create code from comment above. 159s code = Bytecode() 159s label1 = Label() 159s label2 = Label() 159s nop = "NOP" 159s code.append(Instr("JUMP_FORWARD", label1)) 159s code.append(Instr("JUMP_FORWARD", label2)) 159s # range excludes the last point ... 159s for _ in range(4, 511 if OFFSET_AS_INSTRUCTION else 255, 2): 159s code.append(Instr(nop)) 159s code.append(label1) 159s code.append(Instr(nop)) 159s for _ in range( 159s 514 if OFFSET_AS_INSTRUCTION else 256, 159s 600 if OFFSET_AS_INSTRUCTION else 300, 159s 2, 159s ): 159s code.append(Instr(nop)) 159s code.append(label2) 159s code.append(Instr(nop)) 159s 159s # This should pass by default. 159s > code.to_code() 159s 159s tests/test_concrete.py:1653: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 79 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ______________ BytecodeToConcreteTests.test_dont_merge_constants _______________ 159s 159s self = 159s 159s def test_dont_merge_constants(self): 159s # test two constants which are equal but have a different type 159s code = Bytecode() 159s code.extend( 159s [ 159s Instr("LOAD_CONST", 5, lineno=1), 159s Instr("LOAD_CONST", 5.0, lineno=1), 159s Instr("LOAD_CONST", -0.0, lineno=1), 159s Instr("LOAD_CONST", +0.0, lineno=1), 159s ] 159s ) 159s 159s > code = code.to_concrete_bytecode() 159s 159s tests/test_concrete.py:1584: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s __________________ BytecodeToConcreteTests.test_extended_jump __________________ 159s 159s self = 159s 159s def test_extended_jump(self): 159s NOP = bytes((opcode.opmap["NOP"], 0)) 159s 159s # code using jumps > 0xffff to test extended arg 159s nb_nop = 2**16 if OFFSET_AS_INSTRUCTION else 2**15 159s # The length of the jump is independent of the number of instruction 159s # per the above logic. 159s jump = 2**16 159s code = ConcreteBytecode( 159s [ConcreteInstr("JUMP_FORWARD", jump)] 159s + [ConcreteInstr("NOP")] * nb_nop 159s + [ 159s ConcreteInstr("LOAD_CONST", 0), 159s ConcreteInstr("RETURN_VALUE"), 159s ], 159s consts=(None,), 159s ) 159s 159s > code_obj = code.to_code() 159s 159s tests/test_concrete.py:1514: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:862: in to_code 159s cfg = _bytecode.ControlFlowGraph.from_bytecode(self.to_bytecode()) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 79 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________ BytecodeToConcreteTests.test_extreme_compute_jumps_convergence ________ 159s 159s self = 159s 159s def test_extreme_compute_jumps_convergence(self): 159s """Test of compute_jumps() requiring absurd number of passes. 159s 159s NOTE: This test also serves to demonstrate that there is no worst 159s case: the number of passes can be unlimited (or, actually, limited by 159s the size of the provided code). 159s 159s This is an extension of test_compute_jumps_convergence. Instead of 159s two jumps, where the earlier gets extended after the latter, we 159s instead generate a series of many jumps. Each pass of compute_jumps() 159s extends one more instruction, which in turn causes the one behind it 159s to be extended on the next pass. 159s 159s """ 159s 159s # N: the number of unextended instructions that can be squeezed into a 159s # set of bytes adressable by the arg of an unextended instruction. 159s # The answer is "128", but here's how we arrive at it. 159s max_unextended_offset = 1 << 8 159s unextended_branch_instr_size = 2 159s N = max_unextended_offset // unextended_branch_instr_size 159s 159s # When using instruction rather than bytes in the offset multiply by 2 159s if OFFSET_AS_INSTRUCTION: 159s N *= 2 159s 159s nop = "UNARY_NEGATIVE" # don't use NOP, dis.stack_effect will raise 159s 159s # The number of jumps will be equal to the number of labels. The 159s # number of passes of compute_jumps() required will be one greater 159s # than this. 159s labels = [Label() for x in range(0, 3 * N)] 159s 159s code = Bytecode() 159s code.extend( 159s Instr("JUMP_FORWARD", labels[len(labels) - x - 1]) 159s for x in range(0, len(labels)) 159s ) 159s end_of_jumps = len(code) 159s code.extend(Instr(nop) for x in range(0, N)) 159s 159s # Now insert the labels. The first is N instructions (i.e. 256 159s # bytes) after the last jump. Then they proceed to earlier positions 159s # 4 bytes at a time. While the targets are in the range of the nop 159s # instructions, 4 bytes is two instructions. When the targets are in 159s # the range of JUMP_FORWARD instructions we have to allow for the fact 159s # that the instructions will have been extended to four bytes each, so 159s # working backwards 4 bytes per label means just one instruction per 159s # label. 159s offset = end_of_jumps + N 159s for index in range(0, len(labels)): 159s code.insert(offset, labels[index]) 159s if offset <= end_of_jumps: 159s offset -= 1 159s else: 159s offset -= 2 159s 159s code.insert(0, Instr("LOAD_CONST", 0)) 159s del end_of_jumps 159s code.append(Instr("RETURN_VALUE")) 159s 159s > code.to_code(compute_jumps_passes=(len(labels) + 1)) 159s 159s tests/test_concrete.py:1720: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________ BytecodeToConcreteTests.test_general_constants ________________ 159s 159s self = 159s 159s def test_general_constants(self): 159s """Test if general object could be linked as constants.""" 159s 159s class CustomObject: 159s pass 159s 159s class UnHashableCustomObject: 159s __hash__ = None 159s 159s obj1 = [1, 2, 3] 159s obj2 = {1, 2, 3} 159s obj3 = CustomObject() 159s obj4 = UnHashableCustomObject() 159s code = Bytecode( 159s [ 159s Instr("LOAD_CONST", obj1, lineno=1), 159s Instr("LOAD_CONST", obj2, lineno=1), 159s Instr("LOAD_CONST", obj3, lineno=1), 159s Instr("LOAD_CONST", obj4, lineno=1), 159s Instr("BUILD_TUPLE", 4, lineno=1), 159s Instr("RETURN_VALUE", lineno=1), 159s ] 159s ) 159s > self.assertEqual(code.to_code().co_consts, (obj1, obj2, obj3, obj4)) 159s 159s tests/test_concrete.py:1745: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ______________________ BytecodeToConcreteTests.test_jumps ______________________ 159s 159s self = 159s 159s def test_jumps(self): 159s # if test: 159s # x = 12 159s # else: 159s # x = 37 159s code = Bytecode() 159s label_else = Label() 159s label_return = Label() 159s code.extend( 159s [ 159s Instr("LOAD_NAME", "test", lineno=1), 159s Instr( 159s "POP_JUMP_FORWARD_IF_FALSE" 159s if (3, 12) > sys.version_info >= (3, 11) 159s else "POP_JUMP_IF_FALSE", 159s label_else, 159s ), 159s Instr("LOAD_CONST", 12, lineno=2), 159s Instr("STORE_NAME", "x"), 159s Instr("JUMP_FORWARD", label_return), 159s label_else, 159s Instr("LOAD_CONST", 37, lineno=4), 159s Instr("STORE_NAME", "x"), 159s label_return, 159s Instr("LOAD_CONST", None, lineno=4), 159s Instr("RETURN_VALUE"), 159s ] 159s ) 159s 159s > code = code.to_concrete_bytecode() 159s 159s tests/test_concrete.py:1549: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 92 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ______________________ BytecodeToConcreteTests.test_label ______________________ 159s 159s self = 159s 159s def test_label(self): 159s code = Bytecode() 159s label = Label() 159s code.extend( 159s [ 159s Instr("LOAD_CONST", "hello", lineno=1), 159s Instr("JUMP_FORWARD", label, lineno=1), 159s label, 159s Instr("POP_TOP", lineno=1), 159s ] 159s ) 159s 159s > code = code.to_concrete_bytecode() 159s 159s tests/test_concrete.py:1341: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _____________________ BytecodeToConcreteTests.test_label2 ______________________ 159s 159s self = 159s 159s def test_label2(self): 159s bytecode = Bytecode() 159s label = Label() 159s bytecode.extend( 159s [ 159s Instr("LOAD_NAME", "test", lineno=1), 159s Instr( 159s "POP_JUMP_FORWARD_IF_FALSE" 159s if (3, 12) > sys.version_info >= (3, 11) 159s else "POP_JUMP_IF_FALSE", 159s label, 159s ), 159s Instr("LOAD_CONST", 5, lineno=2), 159s Instr("STORE_NAME", "x"), 159s Instr("JUMP_FORWARD", label), 159s Instr("LOAD_CONST", 7, lineno=4), 159s Instr("STORE_NAME", "x"), 159s label, 159s Instr("LOAD_CONST", None), 159s Instr("RETURN_VALUE"), 159s ] 159s ) 159s 159s > concrete = bytecode.to_concrete_bytecode() 159s 159s tests/test_concrete.py:1373: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 92 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _____________________ BytecodeToConcreteTests.test_label3 ______________________ 159s 159s self = 159s 159s def test_label3(self): 159s """ 159s CPython generates useless EXTENDED_ARG 0 in some cases. We need to 159s properly track them as otherwise we can end up with broken offset for 159s jumps. 159s """ 159s source = """ 159s def func(x): 159s if x == 1: 159s return x + 0 159s elif x == 2: 159s return x + 1 159s elif x == 3: 159s return x + 2 159s elif x == 4: 159s return x + 3 159s elif x == 5: 159s return x + 4 159s elif x == 6: 159s return x + 5 159s elif x == 7: 159s return x + 6 159s elif x == 8: 159s return x + 7 159s elif x == 9: 159s return x + 8 159s elif x == 10: 159s return x + 9 159s elif x == 11: 159s return x + 10 159s elif x == 12: 159s return x + 11 159s elif x == 13: 159s return x + 12 159s elif x == 14: 159s return x + 13 159s elif x == 15: 159s return x + 14 159s elif x == 16: 159s return x + 15 159s elif x == 17: 159s return x + 16 159s return -1 159s """ 159s code = get_code(source, function=True) 159s > bcode = Bytecode.from_code(code) 159s 159s tests/test_concrete.py:1441: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ____________________ BytecodeToConcreteTests.test_setlineno ____________________ 159s 159s self = 159s 159s def test_setlineno(self): 159s # x = 7 159s # y = 8 159s # z = 9 159s concrete = ConcreteBytecode() 159s concrete.consts = [7, 8, 9] 159s concrete.names = ["x", "y", "z"] 159s concrete.first_lineno = 3 159s concrete.extend( 159s [ 159s ConcreteInstr("LOAD_CONST", 0), 159s ConcreteInstr("STORE_NAME", 0), 159s SetLineno(4), 159s ConcreteInstr("LOAD_CONST", 1), 159s ConcreteInstr("STORE_NAME", 1), 159s SetLineno(5), 159s ConcreteInstr("LOAD_CONST", 2), 159s ConcreteInstr("STORE_NAME", 2), 159s ] 159s ) 159s 159s > code = concrete.to_bytecode() 159s 159s tests/test_concrete.py:1483: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 83 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _____________________________ InstrTests.test_attr _____________________________ 159s 159s self = 159s 159s def test_attr(self): 159s instr = Instr("LOAD_CONST", 3, lineno=5) 159s self.assertEqual(instr.name, "LOAD_CONST") 159s > self.assertEqual(instr.opcode, 100) 159s E AssertionError: 83 != 100 159s 159s tests/test_instr.py:232: AssertionError 159s _____________ InstrTests.test_code_object_containing_mutable_data ______________ 159s 159s self = 159s 159s def test_code_object_containing_mutable_data(self): 159s from types import CodeType 159s 159s from bytecode import Bytecode, Instr 159s 159s def f(): 159s def g(): 159s # Under Python 3.12+ we need a temporary var to be sure we use 159s # LOAD_CONST rather than RETURN_CONST 159s a = "value" 159s return a 159s 159s return g 159s 159s > f_code = Bytecode.from_code(f.__code__) 159s 159s tests/test_instr.py:434: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ________________________ CompareTests.test_compare_ops _________________________ 159s 159s self = 159s 159s def test_compare_ops(self): 159s from bytecode import Bytecode, Instr 159s 159s def f(): 159s pass 159s 159s params = zip(iter(Compare), (True, True, False, True, False, False)) 159s for cmp, expected in params: 159s with self.subTest(cmp): 159s bcode = Bytecode( 159s ([Instr("RESUME", 0)] if sys.version_info >= (3, 11) else []) 159s + [ 159s Instr("LOAD_CONST", 24), 159s Instr("LOAD_CONST", 42), 159s Instr("COMPARE_OP", cmp), 159s Instr("RETURN_VALUE"), 159s ] 159s ) 159s > f.__code__ = bcode.to_code() 159s 159s tests/test_instr.py:479: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:312: in to_code 159s bc = self.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:327: in to_concrete_bytecode 159s return converter.to_concrete_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1408: in to_concrete_bytecode 159s self.concrete_instructions() 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:1282: in concrete_instructions 159s self.required_caches = c_instr.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _________________________ DumpCodeTests.test_bytecode __________________________ 159s 159s self = 159s 159s def test_bytecode(self): 159s source = """ 159s def func(test): 159s if test == 1: 159s return 1 159s elif test == 2: 159s return 2 159s return 3 159s """ 159s > code = disassemble(source, function=True) 159s 159s tests/test_misc.py:37: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s ______________________ DumpCodeTests.test_bytecode_blocks ______________________ 159s 159s self = 159s 159s def test_bytecode_blocks(self): 159s source = """ 159s def func(test): 159s if test == 1: 159s return 1 159s elif test == 2: 159s return 2 159s return 3 159s """ 159s > code = disassemble(source, function=True) 159s 159s tests/test_misc.py:206: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s _____________________ DumpCodeTests.test_concrete_bytecode _____________________ 159s 159s self = 159s 159s def test_concrete_bytecode(self): 159s source = """ 159s def func(test): 159s if test == 1: 159s return 1 159s elif test == 2: 159s return 2 159s return 3 159s """ 159s > code = disassemble(source, function=True) 159s 159s tests/test_misc.py:409: 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s tests/__init__.py:143: in disassemble 159s return Bytecode.from_code(code) 159s /usr/lib/python3/dist-packages/bytecode/bytecode.py:283: in from_code 159s return concrete.to_bytecode( 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:943: in to_bytecode 159s target = c_instr.get_jump_target(offset) 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:145: in get_jump_target 159s ) + self.use_cache_opcodes() 159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 159s 159s self = 159s 159s def use_cache_opcodes(self) -> int: 159s return ( 159s # Not supposed to be used but we need it 159s > dis._inline_cache_entries[self._opcode] # type: ignore 159s if sys.version_info >= (3, 11) 159s else 0 159s ) 159s E KeyError: 149 159s 159s /usr/lib/python3/dist-packages/bytecode/concrete.py:188: KeyError 159s =========================== short test summary info ============================ 159s FAILED tests/test_bytecode.py::BytecodeTests::test_cellvar_freevar_roundtrip 159s FAILED tests/test_bytecode.py::BytecodeTests::test_eq - KeyError: 149 159s FAILED tests/test_bytecode.py::BytecodeTests::test_eq_with_try - KeyError: 149 159s FAILED tests/test_bytecode.py::BytecodeTests::test_exception_table_round_trip 159s FAILED tests/test_bytecode.py::BytecodeTests::test_from_code - KeyError: 149 159s FAILED tests/test_bytecode.py::BytecodeTests::test_from_code_freevars - KeyEr... 159s FAILED tests/test_bytecode.py::BytecodeTests::test_from_code_load_fast - KeyE... 159s FAILED tests/test_bytecode.py::BytecodeTests::test_negative_size_binary_with_disable_check_of_pre_and_post 159s FAILED tests/test_bytecode.py::BytecodeTests::test_negative_size_build_const_map_with_disable_check_of_pre_and_post 159s FAILED tests/test_bytecode.py::BytecodeTests::test_negative_size_build_map_with_disable_check_of_pre_and_post 159s FAILED tests/test_bytecode.py::BytecodeTests::test_negative_size_unary_with_disable_check_of_pre_and_post 159s FAILED tests/test_bytecode.py::BytecodeTests::test_not_enough_copy_with_disable_check_of_pre_and_post 159s FAILED tests/test_bytecode.py::BytecodeTests::test_not_enough_swap_with_disable_check_of_pre_and_post 159s FAILED tests/test_bytecode.py::BytecodeTests::test_setlineno - KeyError: 83 159s FAILED tests/test_bytecode.py::BytecodeTests::test_to_code - KeyError: 92 159s FAILED tests/test_cfg.py::BytecodeBlocksTests::test_attr - KeyError: 149 159s FAILED tests/test_cfg.py::BytecodeBlocksFunctionalTests::test_eq - KeyError: 149 159s FAILED tests/test_cfg.py::BytecodeBlocksFunctionalTests::test_eq_with_try_except 159s FAILED tests/test_cfg.py::BytecodeBlocksFunctionalTests::test_split_block - K... 159s FAILED tests/test_cfg.py::BytecodeBlocksFunctionalTests::test_split_block_dont_split 159s FAILED tests/test_cfg.py::BytecodeBlocksFunctionalTests::test_split_block_end 159s FAILED tests/test_cfg.py::BytecodeBlocksFunctionalTests::test_split_block_error 159s FAILED tests/test_cfg.py::BytecodeBlocksFunctionalTests::test_to_code - KeyEr... 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_and 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_for_loop_continue 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_if_else 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_nested_try_except_else_finally 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_nested_try_except_finally 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_or 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_try_except 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_try_except_else_finally 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_try_except_finally 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_try_finally 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_while_loop_break 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_computation_with 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_with_dead_code 159s FAILED tests/test_cfg.py::CFGStacksizeComputationTests::test_stack_size_with_dead_code2 159s FAILED tests/test_cfg.py::CFGRoundTripTests::test_cellvar_freevar_roundtrip 159s FAILED tests/test_cfg.py::CFGRoundTripTests::test_roundtrip_exception_handling 159s FAILED tests/test_code.py::CodeTests::test_async_func - KeyError: 35 159s FAILED tests/test_code.py::CodeTests::test_generator_func - KeyError: 35 159s FAILED tests/test_code.py::CodeTests::test_kwargs - KeyError: 149 159s FAILED tests/test_code.py::CodeTests::test_kwonlyargs - KeyError: 149 159s FAILED tests/test_code.py::CodeTests::test_loop - KeyError: 149 159s FAILED tests/test_code.py::CodeTests::test_varargs - KeyError: 149 159s FAILED tests/test_concrete.py::ConcreteInstrTests::test_assemble - AssertionE... 159s FAILED tests/test_concrete.py::ConcreteInstrTests::test_attr - AssertionError... 159s FAILED tests/test_concrete.py::ConcreteInstrTests::test_disassemble - Asserti... 159s FAILED tests/test_concrete.py::ConcreteInstrTests::test_get_jump_target - Key... 159s FAILED tests/test_concrete.py::ConcreteInstrTests::test_set_attr - AssertionE... 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_cellvar - KeyError... 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_cellvar_freevar - ... 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_eq - KeyError: 83 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_explicit_stacksize 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_extended_lnotab - ... 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_extended_lnotab2 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_freevar - KeyError... 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_load_classderef - ... 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_negative_lnotab - ... 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_to_bytecode_consts 159s FAILED tests/test_concrete.py::ConcreteBytecodeTests::test_to_code_lnotab - K... 159s FAILED tests/test_concrete.py::ConcreteFromCodeTests::test_cellvar_freevar_roundtrip 159s FAILED tests/test_concrete.py::ConcreteFromCodeTests::test_exception_table_round_trip 159s FAILED tests/test_concrete.py::ConcreteFromCodeTests::test_expected_arg_with_many_consts 159s FAILED tests/test_concrete.py::ConcreteFromCodeTests::test_extended_arg_make_function 159s FAILED tests/test_concrete.py::ConcreteFromCodeTests::test_extended_arg_nop 159s FAILED tests/test_concrete.py::ConcreteFromCodeTests::test_extended_arg_unpack_ex 159s FAILED tests/test_concrete.py::ConcreteFromCodeTests::test_fail_extended_arg_jump 159s FAILED tests/test_concrete.py::ConcreteFromCodeTests::test_packing_lines - Ke... 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_cellvars - KeyEr... 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_compute_jumps_convergence 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_dont_merge_constants 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_extended_jump - ... 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_extreme_compute_jumps_convergence 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_general_constants 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_jumps - KeyError... 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_label - KeyError... 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_label2 - KeyErro... 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_label3 - KeyErro... 159s FAILED tests/test_concrete.py::BytecodeToConcreteTests::test_setlineno - KeyE... 159s FAILED tests/test_instr.py::InstrTests::test_attr - AssertionError: 83 != 100 159s FAILED tests/test_instr.py::InstrTests::test_code_object_containing_mutable_data 159s FAILED tests/test_instr.py::CompareTests::test_compare_ops - KeyError: 149 159s FAILED tests/test_misc.py::DumpCodeTests::test_bytecode - KeyError: 149 159s FAILED tests/test_misc.py::DumpCodeTests::test_bytecode_blocks - KeyError: 149 159s FAILED tests/test_misc.py::DumpCodeTests::test_concrete_bytecode - KeyError: 149 159s =================== 86 failed, 71 passed, 8 skipped in 5.03s =================== 159s autopkgtest [21:16:19]: test pytest: -----------------------] 160s pytest FAIL non-zero exit status 1 160s autopkgtest [21:16:20]: test pytest: - - - - - - - - - - results - - - - - - - - - - 160s autopkgtest [21:16:20]: @@@@@@@@@@@@@@@@@@@@ summary 160s pytest FAIL non-zero exit status 1 172s virt: nova [W] Skipping flock in bos03-arm64 172s virt: Creating nova instance adt-plucky-arm64-python-bytecode-20241123-203536-juju-7f2275-prod-proposed-migration-environment-2-cc904610-4b72-4980-adf9-125f82b8d97c from image adt/ubuntu-plucky-arm64-server-20241119.img (UUID 254dc414-4366-404b-b85c-a4e26b3194ad)...