0s autopkgtest [16:56:11]: starting date and time: 2024-11-09 16:56:11+0000 0s autopkgtest [16:56:11]: git checkout: 0acbae0a WIP show VirtSubproc stderr in real-time 0s autopkgtest [16:56:11]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.afyqfv30/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python-cryptography,src:httpx --apt-upgrade python-authlib --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=python-cryptography/43.0.0-1 httpx/0.27.0-1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-ppc64el --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-ppc64el-8.secgroup --name adt-plucky-ppc64el-python-authlib-20241109-165611-juju-7f2275-prod-proposed-migration-environment-2-f5e69510-42b1-4144-be6e-91c3285dffdd --image adt/ubuntu-plucky-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration-ppc64el -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/ 69s autopkgtest [16:57:20]: testbed dpkg architecture: ppc64el 69s autopkgtest [16:57:20]: testbed apt version: 2.9.8 69s autopkgtest [16:57:20]: @@@@@@@@@@@@@@@@@@@@ test bed setup 70s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 70s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [7016 B] 70s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.3 kB] 70s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [992 kB] 70s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [104 kB] 70s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main ppc64el Packages [126 kB] 70s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe ppc64el Packages [707 kB] 70s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse ppc64el Packages [19.6 kB] 71s Fetched 2046 kB in 1s (2196 kB/s) 71s Reading package lists... 73s Reading package lists... 73s Building dependency tree... 73s Reading state information... 73s Calculating upgrade... 73s The following NEW packages will be installed: 73s python3-bcrypt systemd-cryptsetup 73s The following packages will be upgraded: 73s base-passwd bash-completion libattr1 libblockdev-crypto3 libblockdev-fs3 73s libblockdev-loop3 libblockdev-mdraid3 libblockdev-nvme3 libblockdev-part3 73s libblockdev-swap3 libblockdev-utils3 libblockdev3 libbpf1 libbsd0 73s libbytesize-common libbytesize1 libdrm-common libdrm2 libjson-glib-1.0-0 73s libjson-glib-1.0-common libmaxminddb0 libmnl0 libnghttp2-14 libnspr4 73s libnss-systemd libpam-systemd libpython3.12-minimal libpython3.12-stdlib 73s libpython3.12t64 libsystemd-shared libsystemd0 libudev1 libudisks2-0 73s liburcu8t64 linux-firmware openssh-client openssh-server openssh-sftp-server 73s pci.ids python3-cryptography python3-gi python3-idna python3-jsonpatch 73s python3-lazr.restfulclient python3-urllib3 python3-wadllib python3.12 73s python3.12-gdbm python3.12-minimal systemd systemd-resolved systemd-sysv 73s systemd-timesyncd tzdata udev udisks2 usbutils 74s 57 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. 74s Need to get 561 MB of archives. 74s After this operation, 28.2 MB of additional disk space will be used. 74s Get:1 http://ftpmaster.internal/ubuntu plucky/main ppc64el base-passwd ppc64el 3.6.5 [55.1 kB] 74s Get:2 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpython3.12t64 ppc64el 3.12.7-2 [2565 kB] 74s Get:3 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3.12 ppc64el 3.12.7-2 [661 kB] 74s Get:4 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpython3.12-stdlib ppc64el 3.12.7-2 [2121 kB] 74s Get:5 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3.12-minimal ppc64el 3.12.7-2 [2467 kB] 74s Get:6 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpython3.12-minimal ppc64el 3.12.7-2 [839 kB] 75s Get:7 http://ftpmaster.internal/ubuntu plucky/main ppc64el tzdata all 2024b-1ubuntu2 [274 kB] 75s Get:8 http://ftpmaster.internal/ubuntu plucky/main ppc64el libnss-systemd ppc64el 256.5-2ubuntu4 [215 kB] 75s Get:9 http://ftpmaster.internal/ubuntu plucky/main ppc64el systemd-timesyncd ppc64el 256.5-2ubuntu4 [42.5 kB] 75s Get:10 http://ftpmaster.internal/ubuntu plucky/main ppc64el systemd-resolved ppc64el 256.5-2ubuntu4 [368 kB] 75s Get:11 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsystemd-shared ppc64el 256.5-2ubuntu4 [2503 kB] 75s Get:12 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsystemd0 ppc64el 256.5-2ubuntu4 [565 kB] 75s Get:13 http://ftpmaster.internal/ubuntu plucky/main ppc64el systemd-sysv ppc64el 256.5-2ubuntu4 [11.9 kB] 75s Get:14 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpam-systemd ppc64el 256.5-2ubuntu4 [326 kB] 75s Get:15 http://ftpmaster.internal/ubuntu plucky/main ppc64el systemd ppc64el 256.5-2ubuntu4 [3746 kB] 75s Get:16 http://ftpmaster.internal/ubuntu plucky/main ppc64el udev ppc64el 256.5-2ubuntu4 [2141 kB] 75s Get:17 http://ftpmaster.internal/ubuntu plucky/main ppc64el libudev1 ppc64el 256.5-2ubuntu4 [224 kB] 75s Get:18 http://ftpmaster.internal/ubuntu plucky/main ppc64el openssh-sftp-server ppc64el 1:9.7p1-7ubuntu5 [43.3 kB] 75s Get:19 http://ftpmaster.internal/ubuntu plucky/main ppc64el openssh-server ppc64el 1:9.7p1-7ubuntu5 [629 kB] 75s Get:20 http://ftpmaster.internal/ubuntu plucky/main ppc64el openssh-client ppc64el 1:9.7p1-7ubuntu5 [1105 kB] 75s Get:21 http://ftpmaster.internal/ubuntu plucky/main ppc64el libattr1 ppc64el 1:2.5.2-2 [12.8 kB] 75s Get:22 http://ftpmaster.internal/ubuntu plucky/main ppc64el libbsd0 ppc64el 0.12.2-2 [57.4 kB] 75s Get:23 http://ftpmaster.internal/ubuntu plucky/main ppc64el libbpf1 ppc64el 1:1.4.6-1 [217 kB] 75s Get:24 http://ftpmaster.internal/ubuntu plucky/main ppc64el libmnl0 ppc64el 1.0.5-3 [13.4 kB] 75s Get:25 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-gi ppc64el 3.50.0-3 [267 kB] 75s Get:26 http://ftpmaster.internal/ubuntu plucky/main ppc64el bash-completion all 1:2.14.0-2 [210 kB] 75s Get:27 http://ftpmaster.internal/ubuntu plucky/main ppc64el libdrm-common all 2.4.123-1 [8436 B] 75s Get:28 http://ftpmaster.internal/ubuntu plucky/main ppc64el libdrm2 ppc64el 2.4.123-1 [49.6 kB] 75s Get:29 http://ftpmaster.internal/ubuntu plucky/main ppc64el libmaxminddb0 ppc64el 1.11.0-1 [21.6 kB] 75s Get:30 http://ftpmaster.internal/ubuntu plucky/main ppc64el libnghttp2-14 ppc64el 1.64.0-1 [89.7 kB] 75s Get:31 http://ftpmaster.internal/ubuntu plucky/main ppc64el liburcu8t64 ppc64el 0.14.1-1 [72.8 kB] 75s Get:32 http://ftpmaster.internal/ubuntu plucky/main ppc64el pci.ids all 0.0~2024.10.24-1 [279 kB] 75s Get:33 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3.12-gdbm ppc64el 3.12.7-2 [30.6 kB] 75s Get:34 http://ftpmaster.internal/ubuntu plucky/main ppc64el usbutils ppc64el 1:018-1 [89.8 kB] 75s Get:35 http://ftpmaster.internal/ubuntu plucky/main ppc64el libblockdev-utils3 ppc64el 3.2.1-1 [20.6 kB] 75s Get:36 http://ftpmaster.internal/ubuntu plucky/main ppc64el libblockdev-crypto3 ppc64el 3.2.1-1 [24.8 kB] 75s Get:37 http://ftpmaster.internal/ubuntu plucky/main ppc64el libblockdev-fs3 ppc64el 3.2.1-1 [40.6 kB] 75s Get:38 http://ftpmaster.internal/ubuntu plucky/main ppc64el libblockdev-loop3 ppc64el 3.2.1-1 [7704 B] 75s Get:39 http://ftpmaster.internal/ubuntu plucky/main ppc64el libbytesize1 ppc64el 2.11-1ubuntu1 [14.8 kB] 75s Get:40 http://ftpmaster.internal/ubuntu plucky/main ppc64el libbytesize-common all 2.11-1ubuntu1 [3584 B] 75s Get:41 http://ftpmaster.internal/ubuntu plucky/main ppc64el libblockdev-mdraid3 ppc64el 3.2.1-1 [14.2 kB] 76s Get:42 http://ftpmaster.internal/ubuntu plucky/main ppc64el libblockdev-nvme3 ppc64el 3.2.1-1 [20.2 kB] 76s Get:43 http://ftpmaster.internal/ubuntu plucky/main ppc64el libblockdev-part3 ppc64el 3.2.1-1 [17.5 kB] 76s Get:44 http://ftpmaster.internal/ubuntu plucky/main ppc64el libblockdev-swap3 ppc64el 3.2.1-1 [8538 B] 76s Get:45 http://ftpmaster.internal/ubuntu plucky/main ppc64el libblockdev3 ppc64el 3.2.1-1 [54.1 kB] 76s Get:46 http://ftpmaster.internal/ubuntu plucky/main ppc64el libjson-glib-1.0-common all 1.10.0+ds-2 [5502 B] 76s Get:47 http://ftpmaster.internal/ubuntu plucky/main ppc64el libjson-glib-1.0-0 ppc64el 1.10.0+ds-2 [75.9 kB] 76s Get:48 http://ftpmaster.internal/ubuntu plucky/main ppc64el libnspr4 ppc64el 2:4.35-1.1ubuntu2 [134 kB] 76s Get:49 http://ftpmaster.internal/ubuntu plucky/main ppc64el udisks2 ppc64el 2.10.1-11ubuntu1 [344 kB] 76s Get:50 http://ftpmaster.internal/ubuntu plucky/main ppc64el libudisks2-0 ppc64el 2.10.1-11ubuntu1 [180 kB] 76s Get:51 http://ftpmaster.internal/ubuntu plucky/main ppc64el linux-firmware ppc64el 20241108.git3bbb13a7-0ubuntu1 [536 MB] 110s Get:52 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-bcrypt ppc64el 4.2.0-1 [231 kB] 110s Get:53 http://ftpmaster.internal/ubuntu plucky-proposed/main ppc64el python3-cryptography ppc64el 43.0.0-1 [1005 kB] 111s Get:54 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-idna all 3.8-2 [47.0 kB] 111s Get:55 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-jsonpatch all 1.32-4 [12.2 kB] 111s Get:56 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-wadllib all 2.0.0-1 [36.7 kB] 111s Get:57 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-lazr.restfulclient all 0.14.6-2 [50.9 kB] 111s Get:58 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-urllib3 all 2.0.7-2ubuntu0.1 [93.1 kB] 111s Get:59 http://ftpmaster.internal/ubuntu plucky/main ppc64el systemd-cryptsetup ppc64el 256.5-2ubuntu4 [127 kB] 111s Preconfiguring packages ... 111s Fetched 561 MB in 37s (15.1 MB/s) 111s (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 ... 73539 files and directories currently installed.) 111s Preparing to unpack .../base-passwd_3.6.5_ppc64el.deb ... 111s Unpacking base-passwd (3.6.5) over (3.6.4) ... 111s Setting up base-passwd (3.6.5) ... 111s (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 ... 73540 files and directories currently installed.) 111s Preparing to unpack .../00-libpython3.12t64_3.12.7-2_ppc64el.deb ... 111s Unpacking libpython3.12t64:ppc64el (3.12.7-2) over (3.12.7-1) ... 111s Preparing to unpack .../01-python3.12_3.12.7-2_ppc64el.deb ... 112s Unpacking python3.12 (3.12.7-2) over (3.12.7-1) ... 112s Preparing to unpack .../02-libpython3.12-stdlib_3.12.7-2_ppc64el.deb ... 112s Unpacking libpython3.12-stdlib:ppc64el (3.12.7-2) over (3.12.7-1) ... 112s Preparing to unpack .../03-python3.12-minimal_3.12.7-2_ppc64el.deb ... 112s Unpacking python3.12-minimal (3.12.7-2) over (3.12.7-1) ... 112s Preparing to unpack .../04-libpython3.12-minimal_3.12.7-2_ppc64el.deb ... 112s Unpacking libpython3.12-minimal:ppc64el (3.12.7-2) over (3.12.7-1) ... 112s Preparing to unpack .../05-tzdata_2024b-1ubuntu2_all.deb ... 112s Unpacking tzdata (2024b-1ubuntu2) over (2024a-4ubuntu1) ... 112s Preparing to unpack .../06-libnss-systemd_256.5-2ubuntu4_ppc64el.deb ... 112s Unpacking libnss-systemd:ppc64el (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 112s Preparing to unpack .../07-systemd-timesyncd_256.5-2ubuntu4_ppc64el.deb ... 112s Unpacking systemd-timesyncd (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 112s Preparing to unpack .../08-systemd-resolved_256.5-2ubuntu4_ppc64el.deb ... 112s Unpacking systemd-resolved (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 112s Preparing to unpack .../09-libsystemd-shared_256.5-2ubuntu4_ppc64el.deb ... 112s Unpacking libsystemd-shared:ppc64el (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 112s Preparing to unpack .../10-libsystemd0_256.5-2ubuntu4_ppc64el.deb ... 112s Unpacking libsystemd0:ppc64el (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 112s Setting up libsystemd0:ppc64el (256.5-2ubuntu4) ... 112s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73539 files and directories currently installed.) 112s Preparing to unpack .../systemd-sysv_256.5-2ubuntu4_ppc64el.deb ... 112s Unpacking systemd-sysv (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 112s Preparing to unpack .../libpam-systemd_256.5-2ubuntu4_ppc64el.deb ... 112s Unpacking libpam-systemd:ppc64el (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 112s Preparing to unpack .../systemd_256.5-2ubuntu4_ppc64el.deb ... 112s Unpacking systemd (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 113s Preparing to unpack .../udev_256.5-2ubuntu4_ppc64el.deb ... 113s Unpacking udev (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 113s Preparing to unpack .../libudev1_256.5-2ubuntu4_ppc64el.deb ... 113s Unpacking libudev1:ppc64el (256.5-2ubuntu4) over (256.5-2ubuntu3) ... 113s Setting up libudev1:ppc64el (256.5-2ubuntu4) ... 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73539 files and directories currently installed.) 113s Preparing to unpack .../openssh-sftp-server_1%3a9.7p1-7ubuntu5_ppc64el.deb ... 113s Unpacking openssh-sftp-server (1:9.7p1-7ubuntu5) over (1:9.7p1-7ubuntu4) ... 113s Preparing to unpack .../openssh-server_1%3a9.7p1-7ubuntu5_ppc64el.deb ... 113s Unpacking openssh-server (1:9.7p1-7ubuntu5) over (1:9.7p1-7ubuntu4) ... 113s Preparing to unpack .../openssh-client_1%3a9.7p1-7ubuntu5_ppc64el.deb ... 113s Unpacking openssh-client (1:9.7p1-7ubuntu5) over (1:9.7p1-7ubuntu4) ... 113s Preparing to unpack .../libattr1_1%3a2.5.2-2_ppc64el.deb ... 113s Unpacking libattr1:ppc64el (1:2.5.2-2) over (1:2.5.2-1build2) ... 113s Setting up libattr1:ppc64el (1:2.5.2-2) ... 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73539 files and directories currently installed.) 113s Preparing to unpack .../libbsd0_0.12.2-2_ppc64el.deb ... 113s Unpacking libbsd0:ppc64el (0.12.2-2) over (0.12.2-1) ... 113s Setting up libbsd0:ppc64el (0.12.2-2) ... 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73539 files and directories currently installed.) 113s Preparing to unpack .../00-libbpf1_1%3a1.4.6-1_ppc64el.deb ... 113s Unpacking libbpf1:ppc64el (1:1.4.6-1) over (1:1.4.5-1) ... 113s Preparing to unpack .../01-libmnl0_1.0.5-3_ppc64el.deb ... 113s Unpacking libmnl0:ppc64el (1.0.5-3) over (1.0.5-2build1) ... 113s Preparing to unpack .../02-python3-gi_3.50.0-3_ppc64el.deb ... 113s Unpacking python3-gi (3.50.0-3) over (3.48.2-1) ... 113s Preparing to unpack .../03-bash-completion_1%3a2.14.0-2_all.deb ... 113s Unpacking bash-completion (1:2.14.0-2) over (1:2.14.0-1) ... 114s Preparing to unpack .../04-libdrm-common_2.4.123-1_all.deb ... 114s Unpacking libdrm-common (2.4.123-1) over (2.4.122-1) ... 114s Preparing to unpack .../05-libdrm2_2.4.123-1_ppc64el.deb ... 114s Unpacking libdrm2:ppc64el (2.4.123-1) over (2.4.122-1) ... 114s Preparing to unpack .../06-libmaxminddb0_1.11.0-1_ppc64el.deb ... 114s Unpacking libmaxminddb0:ppc64el (1.11.0-1) over (1.10.0-1) ... 114s Preparing to unpack .../07-libnghttp2-14_1.64.0-1_ppc64el.deb ... 114s Unpacking libnghttp2-14:ppc64el (1.64.0-1) over (1.62.1-2) ... 114s Preparing to unpack .../08-liburcu8t64_0.14.1-1_ppc64el.deb ... 114s Unpacking liburcu8t64:ppc64el (0.14.1-1) over (0.14.0-4) ... 114s Preparing to unpack .../09-pci.ids_0.0~2024.10.24-1_all.deb ... 114s Unpacking pci.ids (0.0~2024.10.24-1) over (0.0~2024.09.12-1) ... 114s Preparing to unpack .../10-python3.12-gdbm_3.12.7-2_ppc64el.deb ... 114s Unpacking python3.12-gdbm (3.12.7-2) over (3.12.7-1) ... 114s Preparing to unpack .../11-usbutils_1%3a018-1_ppc64el.deb ... 114s Unpacking usbutils (1:018-1) over (1:017-3build1) ... 114s Preparing to unpack .../12-libblockdev-utils3_3.2.1-1_ppc64el.deb ... 114s Unpacking libblockdev-utils3:ppc64el (3.2.1-1) over (3.2.0-2) ... 114s Preparing to unpack .../13-libblockdev-crypto3_3.2.1-1_ppc64el.deb ... 114s Unpacking libblockdev-crypto3:ppc64el (3.2.1-1) over (3.2.0-2) ... 114s Preparing to unpack .../14-libblockdev-fs3_3.2.1-1_ppc64el.deb ... 114s Unpacking libblockdev-fs3:ppc64el (3.2.1-1) over (3.2.0-2) ... 114s Preparing to unpack .../15-libblockdev-loop3_3.2.1-1_ppc64el.deb ... 114s Unpacking libblockdev-loop3:ppc64el (3.2.1-1) over (3.2.0-2) ... 114s Preparing to unpack .../16-libbytesize1_2.11-1ubuntu1_ppc64el.deb ... 114s Unpacking libbytesize1:ppc64el (2.11-1ubuntu1) over (2.10-1ubuntu2) ... 114s Preparing to unpack .../17-libbytesize-common_2.11-1ubuntu1_all.deb ... 114s Unpacking libbytesize-common (2.11-1ubuntu1) over (2.10-1ubuntu2) ... 114s Preparing to unpack .../18-libblockdev-mdraid3_3.2.1-1_ppc64el.deb ... 114s Unpacking libblockdev-mdraid3:ppc64el (3.2.1-1) over (3.2.0-2) ... 114s Preparing to unpack .../19-libblockdev-nvme3_3.2.1-1_ppc64el.deb ... 114s Unpacking libblockdev-nvme3:ppc64el (3.2.1-1) over (3.2.0-2) ... 114s Preparing to unpack .../20-libblockdev-part3_3.2.1-1_ppc64el.deb ... 114s Unpacking libblockdev-part3:ppc64el (3.2.1-1) over (3.2.0-2) ... 114s Preparing to unpack .../21-libblockdev-swap3_3.2.1-1_ppc64el.deb ... 114s Unpacking libblockdev-swap3:ppc64el (3.2.1-1) over (3.2.0-2) ... 114s Preparing to unpack .../22-libblockdev3_3.2.1-1_ppc64el.deb ... 114s Unpacking libblockdev3:ppc64el (3.2.1-1) over (3.2.0-2) ... 114s Preparing to unpack .../23-libjson-glib-1.0-common_1.10.0+ds-2_all.deb ... 114s Unpacking libjson-glib-1.0-common (1.10.0+ds-2) over (1.8.0-2build2) ... 114s Preparing to unpack .../24-libjson-glib-1.0-0_1.10.0+ds-2_ppc64el.deb ... 114s Unpacking libjson-glib-1.0-0:ppc64el (1.10.0+ds-2) over (1.8.0-2build2) ... 114s Preparing to unpack .../25-libnspr4_2%3a4.35-1.1ubuntu2_ppc64el.deb ... 114s Unpacking libnspr4:ppc64el (2:4.35-1.1ubuntu2) over (2:4.35-1.1ubuntu1) ... 114s Preparing to unpack .../26-udisks2_2.10.1-11ubuntu1_ppc64el.deb ... 114s Unpacking udisks2 (2.10.1-11ubuntu1) over (2.10.1-9ubuntu2) ... 114s Preparing to unpack .../27-libudisks2-0_2.10.1-11ubuntu1_ppc64el.deb ... 114s Unpacking libudisks2-0:ppc64el (2.10.1-11ubuntu1) over (2.10.1-9ubuntu2) ... 114s Preparing to unpack .../28-linux-firmware_20241108.git3bbb13a7-0ubuntu1_ppc64el.deb ... 114s Unpacking linux-firmware (20241108.git3bbb13a7-0ubuntu1) over (20240913.gita34e7a5f-0ubuntu2) ... 117s Selecting previously unselected package python3-bcrypt. 117s Preparing to unpack .../29-python3-bcrypt_4.2.0-1_ppc64el.deb ... 117s Unpacking python3-bcrypt (4.2.0-1) ... 117s Preparing to unpack .../30-python3-cryptography_43.0.0-1_ppc64el.deb ... 117s Unpacking python3-cryptography (43.0.0-1) over (42.0.5-2build1) ... 117s Preparing to unpack .../31-python3-idna_3.8-2_all.deb ... 117s Unpacking python3-idna (3.8-2) over (3.6-2.1) ... 117s Preparing to unpack .../32-python3-jsonpatch_1.32-4_all.deb ... 118s Unpacking python3-jsonpatch (1.32-4) over (1.32-3) ... 118s Preparing to unpack .../33-python3-wadllib_2.0.0-1_all.deb ... 118s Unpacking python3-wadllib (2.0.0-1) over (1.3.6-5) ... 118s Preparing to unpack .../34-python3-lazr.restfulclient_0.14.6-2_all.deb ... 118s Unpacking python3-lazr.restfulclient (0.14.6-2) over (0.14.6-1) ... 118s Preparing to unpack .../35-python3-urllib3_2.0.7-2ubuntu0.1_all.deb ... 118s Unpacking python3-urllib3 (2.0.7-2ubuntu0.1) over (2.0.7-2) ... 118s Selecting previously unselected package systemd-cryptsetup. 118s Preparing to unpack .../36-systemd-cryptsetup_256.5-2ubuntu4_ppc64el.deb ... 118s Unpacking systemd-cryptsetup (256.5-2ubuntu4) ... 118s Setting up liburcu8t64:ppc64el (0.14.1-1) ... 118s Setting up pci.ids (0.0~2024.10.24-1) ... 118s Setting up linux-firmware (20241108.git3bbb13a7-0ubuntu1) ... 118s Setting up openssh-client (1:9.7p1-7ubuntu5) ... 118s Setting up libmaxminddb0:ppc64el (1.11.0-1) ... 118s Setting up python3.12-gdbm (3.12.7-2) ... 118s Setting up python3-jsonpatch (1.32-4) ... 118s Setting up python3-bcrypt (4.2.0-1) ... 118s Setting up libpython3.12-minimal:ppc64el (3.12.7-2) ... 118s Setting up libnghttp2-14:ppc64el (1.64.0-1) ... 118s Setting up usbutils (1:018-1) ... 118s Setting up tzdata (2024b-1ubuntu2) ... 118s 118s Current default time zone: 'Etc/UTC' 118s Local time is now: Sat Nov 9 16:58:09 UTC 2024. 118s Universal Time is now: Sat Nov 9 16:58:09 UTC 2024. 118s Run 'dpkg-reconfigure tzdata' if you wish to change it. 118s 118s Setting up libnspr4:ppc64el (2:4.35-1.1ubuntu2) ... 118s Setting up bash-completion (1:2.14.0-2) ... 118s Setting up python3-cryptography (43.0.0-1) ... 118s Setting up python3-wadllib (2.0.0-1) ... 119s Setting up python3-gi (3.50.0-3) ... 119s Setting up libbytesize-common (2.11-1ubuntu1) ... 119s Setting up libblockdev-utils3:ppc64el (3.2.1-1) ... 119s Setting up libmnl0:ppc64el (1.0.5-3) ... 119s Setting up python3-idna (3.8-2) ... 119s Setting up libsystemd-shared:ppc64el (256.5-2ubuntu4) ... 119s Setting up python3-urllib3 (2.0.7-2ubuntu0.1) ... 119s Setting up libblockdev-nvme3:ppc64el (3.2.1-1) ... 119s Setting up libblockdev-fs3:ppc64el (3.2.1-1) ... 119s Setting up libjson-glib-1.0-common (1.10.0+ds-2) ... 119s Setting up libbytesize1:ppc64el (2.11-1ubuntu1) ... 119s Setting up python3-lazr.restfulclient (0.14.6-2) ... 119s Setting up libdrm-common (2.4.123-1) ... 119s Setting up libbpf1:ppc64el (1:1.4.6-1) ... 119s Setting up libudisks2-0:ppc64el (2.10.1-11ubuntu1) ... 119s Setting up python3.12-minimal (3.12.7-2) ... 120s Setting up openssh-sftp-server (1:9.7p1-7ubuntu5) ... 120s Setting up libpython3.12-stdlib:ppc64el (3.12.7-2) ... 120s Setting up libblockdev-mdraid3:ppc64el (3.2.1-1) ... 120s Setting up openssh-server (1:9.7p1-7ubuntu5) ... 121s Setting up libblockdev-crypto3:ppc64el (3.2.1-1) ... 121s Setting up libblockdev-swap3:ppc64el (3.2.1-1) ... 121s Setting up python3.12 (3.12.7-2) ... 122s Setting up libblockdev-loop3:ppc64el (3.2.1-1) ... 122s Setting up systemd (256.5-2ubuntu4) ... 122s /usr/lib/tmpfiles.d/legacy.conf:13: Duplicate line for path "/run/lock", ignoring. 122s Created symlink '/run/systemd/system/tmp.mount' → '/dev/null'. 123s /usr/lib/tmpfiles.d/legacy.conf:13: Duplicate line for path "/run/lock", ignoring. 123s Setting up libblockdev3:ppc64el (3.2.1-1) ... 123s Setting up libjson-glib-1.0-0:ppc64el (1.10.0+ds-2) ... 123s Setting up libblockdev-part3:ppc64el (3.2.1-1) ... 123s Setting up libpython3.12t64:ppc64el (3.12.7-2) ... 123s Setting up systemd-cryptsetup (256.5-2ubuntu4) ... 123s Setting up systemd-timesyncd (256.5-2ubuntu4) ... 124s systemd-time-wait-sync.service is a disabled or a static unit not running, not starting it. 124s Setting up udev (256.5-2ubuntu4) ... 125s Setting up libdrm2:ppc64el (2.4.123-1) ... 125s Setting up systemd-resolved (256.5-2ubuntu4) ... 125s Setting up udisks2 (2.10.1-11ubuntu1) ... 126s Setting up systemd-sysv (256.5-2ubuntu4) ... 126s Setting up libnss-systemd:ppc64el (256.5-2ubuntu4) ... 126s Setting up libpam-systemd:ppc64el (256.5-2ubuntu4) ... 126s Processing triggers for libc-bin (2.40-1ubuntu3) ... 126s Processing triggers for ufw (0.36.2-8) ... 126s Processing triggers for man-db (2.12.1-3) ... 126s Processing triggers for dbus (1.14.10-4ubuntu5) ... 126s Processing triggers for shared-mime-info (2.4-5) ... 126s Processing triggers for initramfs-tools (0.142ubuntu34) ... 126s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 126s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 134s Reading package lists... 134s Building dependency tree... 134s Reading state information... 134s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 135s Hit:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease 135s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 135s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 135s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 136s Reading package lists... 136s Reading package lists... 136s Building dependency tree... 136s Reading state information... 136s Calculating upgrade... 136s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 136s Reading package lists... 136s Building dependency tree... 136s Reading state information... 137s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 137s autopkgtest [16:58:28]: rebooting testbed after setup commands that affected boot 141s autopkgtest-virt-ssh: WARNING: ssh connection failed. Retrying in 3 seconds... 167s autopkgtest [16:58:58]: testbed running kernel: Linux 6.11.0-8-generic #8-Ubuntu SMP Mon Sep 16 13:49:23 UTC 2024 169s autopkgtest [16:59:00]: @@@@@@@@@@@@@@@@@@@@ apt-source python-authlib 172s Get:1 http://ftpmaster.internal/ubuntu plucky/universe python-authlib 1.3.2-2 (dsc) [2494 B] 172s Get:2 http://ftpmaster.internal/ubuntu plucky/universe python-authlib 1.3.2-2 (tar) [321 kB] 172s Get:3 http://ftpmaster.internal/ubuntu plucky/universe python-authlib 1.3.2-2 (diff) [6156 B] 172s gpgv: Signature made Mon Oct 21 14:03:43 2024 UTC 172s gpgv: using EDDSA key EE9AD6F90520FA11F69F4824477B0DB0263A54D8 172s gpgv: issuer "stefanor@debian.org" 172s gpgv: Can't check signature: No public key 172s dpkg-source: warning: cannot verify inline signature for ./python-authlib_1.3.2-2.dsc: no acceptable signature found 172s autopkgtest [16:59:03]: testing package python-authlib version 1.3.2-2 172s autopkgtest [16:59:03]: build not needed 173s autopkgtest [16:59:04]: test unittests3: preparing testbed 174s Reading package lists... 174s Building dependency tree... 174s Reading state information... 174s Starting pkgProblemResolver with broken count: 0 174s Starting 2 pkgProblemResolver with broken count: 0 174s Done 175s The following additional packages will be installed: 175s libjs-jquery python3-all python3-anyio python3-asgiref 175s python3-async-generator python3-authlib python3-cachelib python3-click 175s python3-colorama python3-django python3-flask python3-flask-sqlalchemy 175s python3-greenlet python3-h11 python3-httpcore python3-httpx 175s python3-iniconfig python3-itsdangerous python3-packaging python3-pluggy 175s python3-pycryptodome python3-pytest python3-pytest-asyncio 175s python3-pytest-django python3-sniffio python3-sqlalchemy python3-sqlparse 175s python3-starlette python3-werkzeug 175s Suggested packages: 175s python-cachelib-doc bpython3 geoip-database-contrib gettext ipython3 175s libgdal20 libsqlite3-mod-spatialite python-django-doc python3-flup 175s python3-memcache python3-mysqldb python3-pil python3-psycopg2 175s python3-selenium python3-sqlite python3-dotenv python-flask-doc 175s python-greenlet-dev python-greenlet-doc python-sqlalchemy-doc 175s python3-asyncpg python3-pg8000 python3-psycopg2cffi python3-aiosqlite 175s python3-mariadb-connector python3-mysql.connector python3-pyodbc 175s python3-pymssql python3-cx-oracle python3-oracledb python-sqlparse-doc 175s python3-databases python-werkzeug-doc python3-lxml python3-watchdog 175s Recommended packages: 175s javascript-common python3-tz python3-simplejson python3-sqlalchemy-ext 175s python3-uvicorn | python3-daphne python3-aiofiles python3-multipart 175s python3-pyinotify 175s The following NEW packages will be installed: 175s autopkgtest-satdep libjs-jquery python3-all python3-anyio python3-asgiref 175s python3-async-generator python3-authlib python3-cachelib python3-click 175s python3-colorama python3-django python3-flask python3-flask-sqlalchemy 175s python3-greenlet python3-h11 python3-httpcore python3-httpx 175s python3-iniconfig python3-itsdangerous python3-packaging python3-pluggy 175s python3-pycryptodome python3-pytest python3-pytest-asyncio 175s python3-pytest-django python3-sniffio python3-sqlalchemy python3-sqlparse 175s python3-starlette python3-werkzeug 175s 0 upgraded, 30 newly installed, 0 to remove and 0 not upgraded. 175s Need to get 6990 kB/6991 kB of archives. 175s After this operation, 47.9 MB of additional disk space will be used. 175s Get:1 /tmp/autopkgtest.hjREE4/1-autopkgtest-satdep.deb autopkgtest-satdep ppc64el 0 [812 B] 175s Get:2 http://ftpmaster.internal/ubuntu plucky/main ppc64el libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 175s Get:3 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-all ppc64el 3.12.6-0ubuntu1 [888 B] 175s Get:4 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-sniffio all 1.3.1-1 [7262 B] 175s Get:5 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-anyio all 4.4.0-1 [57.4 kB] 175s Get:6 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-asgiref all 3.8.1-1 [24.8 kB] 175s Get:7 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-async-generator all 1.10-4 [17.5 kB] 175s Get:8 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pycryptodome ppc64el 3.20.0+dfsg-3 [1142 kB] 175s Get:9 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-authlib all 1.3.2-2 [112 kB] 175s Get:10 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-cachelib all 0.13.0-2 [20.7 kB] 175s Get:11 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-colorama all 0.4.6-4 [32.1 kB] 175s Get:12 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-click all 8.1.7-2 [79.5 kB] 175s Get:13 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-sqlparse all 0.5.1-2 [32.7 kB] 175s Get:14 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-django all 3:4.2.15-1ubuntu1 [2916 kB] 175s Get:15 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-itsdangerous all 2.2.0-1 [15.2 kB] 175s Get:16 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-werkzeug all 3.0.4-1ubuntu1 [171 kB] 175s Get:17 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-flask all 3.0.3-1ubuntu1 [83.2 kB] 175s Get:18 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-greenlet ppc64el 3.0.3-0ubuntu6 [164 kB] 175s Get:19 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-sqlalchemy all 2.0.32+ds1-1ubuntu1 [1206 kB] 175s Get:20 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-flask-sqlalchemy all 3.1.1-2 [30.9 kB] 175s Get:21 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-h11 all 0.14.0-1 [51.1 kB] 175s Get:22 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-httpcore all 1.0.4-1 [38.8 kB] 175s Get:23 http://ftpmaster.internal/ubuntu plucky-proposed/universe ppc64el python3-httpx all 0.27.0-1 [60.9 kB] 175s Get:24 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-iniconfig all 1.1.1-2 [6024 B] 176s Get:25 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-packaging all 24.1-1 [41.4 kB] 176s Get:26 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pluggy all 1.5.0-1 [21.0 kB] 176s Get:27 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest all 8.3.2-1 [251 kB] 176s Get:28 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest-asyncio all 0.20.3-1.3 [10.7 kB] 176s Get:29 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest-django all 4.5.2-3 [18.5 kB] 176s Get:30 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-starlette all 0.38.5-0ubuntu1 [49.8 kB] 176s Fetched 6990 kB in 1s (6323 kB/s) 176s Selecting previously unselected package libjs-jquery. 176s (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 ... 73789 files and directories currently installed.) 176s Preparing to unpack .../00-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 176s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 176s Selecting previously unselected package python3-all. 176s Preparing to unpack .../01-python3-all_3.12.6-0ubuntu1_ppc64el.deb ... 176s Unpacking python3-all (3.12.6-0ubuntu1) ... 176s Selecting previously unselected package python3-sniffio. 176s Preparing to unpack .../02-python3-sniffio_1.3.1-1_all.deb ... 176s Unpacking python3-sniffio (1.3.1-1) ... 176s Selecting previously unselected package python3-anyio. 176s Preparing to unpack .../03-python3-anyio_4.4.0-1_all.deb ... 176s Unpacking python3-anyio (4.4.0-1) ... 176s Selecting previously unselected package python3-asgiref. 176s Preparing to unpack .../04-python3-asgiref_3.8.1-1_all.deb ... 176s Unpacking python3-asgiref (3.8.1-1) ... 176s Selecting previously unselected package python3-async-generator. 176s Preparing to unpack .../05-python3-async-generator_1.10-4_all.deb ... 176s Unpacking python3-async-generator (1.10-4) ... 176s Selecting previously unselected package python3-pycryptodome. 176s Preparing to unpack .../06-python3-pycryptodome_3.20.0+dfsg-3_ppc64el.deb ... 176s Unpacking python3-pycryptodome (3.20.0+dfsg-3) ... 176s Selecting previously unselected package python3-authlib. 176s Preparing to unpack .../07-python3-authlib_1.3.2-2_all.deb ... 176s Unpacking python3-authlib (1.3.2-2) ... 176s Selecting previously unselected package python3-cachelib. 176s Preparing to unpack .../08-python3-cachelib_0.13.0-2_all.deb ... 176s Unpacking python3-cachelib (0.13.0-2) ... 176s Selecting previously unselected package python3-colorama. 176s Preparing to unpack .../09-python3-colorama_0.4.6-4_all.deb ... 176s Unpacking python3-colorama (0.4.6-4) ... 176s Selecting previously unselected package python3-click. 176s Preparing to unpack .../10-python3-click_8.1.7-2_all.deb ... 176s Unpacking python3-click (8.1.7-2) ... 176s Selecting previously unselected package python3-sqlparse. 176s Preparing to unpack .../11-python3-sqlparse_0.5.1-2_all.deb ... 176s Unpacking python3-sqlparse (0.5.1-2) ... 177s Selecting previously unselected package python3-django. 177s Preparing to unpack .../12-python3-django_3%3a4.2.15-1ubuntu1_all.deb ... 177s Unpacking python3-django (3:4.2.15-1ubuntu1) ... 177s Selecting previously unselected package python3-itsdangerous. 177s Preparing to unpack .../13-python3-itsdangerous_2.2.0-1_all.deb ... 177s Unpacking python3-itsdangerous (2.2.0-1) ... 177s Selecting previously unselected package python3-werkzeug. 177s Preparing to unpack .../14-python3-werkzeug_3.0.4-1ubuntu1_all.deb ... 177s Unpacking python3-werkzeug (3.0.4-1ubuntu1) ... 177s Selecting previously unselected package python3-flask. 177s Preparing to unpack .../15-python3-flask_3.0.3-1ubuntu1_all.deb ... 177s Unpacking python3-flask (3.0.3-1ubuntu1) ... 177s Selecting previously unselected package python3-greenlet. 177s Preparing to unpack .../16-python3-greenlet_3.0.3-0ubuntu6_ppc64el.deb ... 177s Unpacking python3-greenlet (3.0.3-0ubuntu6) ... 177s Selecting previously unselected package python3-sqlalchemy. 177s Preparing to unpack .../17-python3-sqlalchemy_2.0.32+ds1-1ubuntu1_all.deb ... 177s Unpacking python3-sqlalchemy (2.0.32+ds1-1ubuntu1) ... 177s Selecting previously unselected package python3-flask-sqlalchemy. 177s Preparing to unpack .../18-python3-flask-sqlalchemy_3.1.1-2_all.deb ... 177s Unpacking python3-flask-sqlalchemy (3.1.1-2) ... 177s Selecting previously unselected package python3-h11. 177s Preparing to unpack .../19-python3-h11_0.14.0-1_all.deb ... 177s Unpacking python3-h11 (0.14.0-1) ... 177s Selecting previously unselected package python3-httpcore. 177s Preparing to unpack .../20-python3-httpcore_1.0.4-1_all.deb ... 177s Unpacking python3-httpcore (1.0.4-1) ... 177s Selecting previously unselected package python3-httpx. 177s Preparing to unpack .../21-python3-httpx_0.27.0-1_all.deb ... 177s Unpacking python3-httpx (0.27.0-1) ... 177s Selecting previously unselected package python3-iniconfig. 177s Preparing to unpack .../22-python3-iniconfig_1.1.1-2_all.deb ... 177s Unpacking python3-iniconfig (1.1.1-2) ... 177s Selecting previously unselected package python3-packaging. 177s Preparing to unpack .../23-python3-packaging_24.1-1_all.deb ... 177s Unpacking python3-packaging (24.1-1) ... 177s Selecting previously unselected package python3-pluggy. 177s Preparing to unpack .../24-python3-pluggy_1.5.0-1_all.deb ... 177s Unpacking python3-pluggy (1.5.0-1) ... 177s Selecting previously unselected package python3-pytest. 177s Preparing to unpack .../25-python3-pytest_8.3.2-1_all.deb ... 177s Unpacking python3-pytest (8.3.2-1) ... 177s Selecting previously unselected package python3-pytest-asyncio. 177s Preparing to unpack .../26-python3-pytest-asyncio_0.20.3-1.3_all.deb ... 177s Unpacking python3-pytest-asyncio (0.20.3-1.3) ... 177s Selecting previously unselected package python3-pytest-django. 177s Preparing to unpack .../27-python3-pytest-django_4.5.2-3_all.deb ... 177s Unpacking python3-pytest-django (4.5.2-3) ... 178s Selecting previously unselected package python3-starlette. 178s Preparing to unpack .../28-python3-starlette_0.38.5-0ubuntu1_all.deb ... 178s Unpacking python3-starlette (0.38.5-0ubuntu1) ... 178s Selecting previously unselected package autopkgtest-satdep. 178s Preparing to unpack .../29-1-autopkgtest-satdep.deb ... 178s Unpacking autopkgtest-satdep (0) ... 178s Setting up python3-iniconfig (1.1.1-2) ... 178s Setting up python3-sniffio (1.3.1-1) ... 178s Setting up python3-async-generator (1.10-4) ... 178s Setting up python3-anyio (4.4.0-1) ... 178s Setting up python3-colorama (0.4.6-4) ... 178s Setting up python3-pycryptodome (3.20.0+dfsg-3) ... 179s Setting up python3-itsdangerous (2.2.0-1) ... 179s Setting up python3-all (3.12.6-0ubuntu1) ... 179s Setting up python3-starlette (0.38.5-0ubuntu1) ... 179s Setting up python3-click (8.1.7-2) ... 179s Setting up python3-packaging (24.1-1) ... 179s Setting up python3-sqlparse (0.5.1-2) ... 179s Setting up python3-greenlet (3.0.3-0ubuntu6) ... 180s Setting up python3-h11 (0.14.0-1) ... 180s Setting up python3-pluggy (1.5.0-1) ... 180s Setting up python3-cachelib (0.13.0-2) ... 180s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 180s Setting up python3-asgiref (3.8.1-1) ... 180s Setting up python3-authlib (1.3.2-2) ... 180s Setting up python3-httpcore (1.0.4-1) ... 180s Setting up python3-django (3:4.2.15-1ubuntu1) ... 182s Setting up python3-pytest (8.3.2-1) ... 182s Setting up python3-pytest-django (4.5.2-3) ... 182s Setting up python3-sqlalchemy (2.0.32+ds1-1ubuntu1) ... 184s Setting up python3-httpx (0.27.0-1) ... 184s Setting up python3-werkzeug (3.0.4-1ubuntu1) ... 184s Setting up python3-pytest-asyncio (0.20.3-1.3) ... 184s Setting up python3-flask (3.0.3-1ubuntu1) ... 185s Setting up python3-flask-sqlalchemy (3.1.1-2) ... 185s Setting up autopkgtest-satdep (0) ... 185s Processing triggers for man-db (2.12.1-3) ... 188s (Reading database ... 81646 files and directories currently installed.) 188s Removing autopkgtest-satdep (0) ... 189s autopkgtest [16:59:20]: test unittests3: [----------------------- 189s === python3.12 === 189s ============================= test session starts ============================== 189s platform linux -- Python 3.12.7+, pytest-8.3.2, pluggy-1.5.0 189s rootdir: /tmp/autopkgtest.hjREE4/autopkgtest_tmp 189s configfile: setup.cfg 189s plugins: asyncio-0.20.3, django-4.5.2, anyio-4.4.0, typeguard-4.4.1 189s asyncio: mode=Mode.STRICT 189s collected 101 items 189s 189s tests/core/test_oauth2/test_rfc6749_misc.py ...... [ 5%] 190s tests/core/test_oauth2/test_rfc7523.py ........................ [ 29%] 190s tests/core/test_oauth2/test_rfc7591.py ...... [ 35%] 190s tests/core/test_oauth2/test_rfc7662.py ...... [ 41%] 190s tests/core/test_oauth2/test_rfc8414.py .......................... [ 67%] 190s tests/core/test_oidc/test_core.py .......... [ 77%] 190s tests/core/test_oidc/test_discovery.py ....................... [100%] 190s 190s ============================= 101 passed in 0.70s ============================== 191s ============================= test session starts ============================== 191s platform linux -- Python 3.12.7+, pytest-8.3.2, pluggy-1.5.0 191s django: settings: tests.clients.test_django.settings (from env) 191s rootdir: /tmp/autopkgtest.hjREE4/autopkgtest_tmp 191s configfile: setup.cfg 191s plugins: asyncio-0.20.3, django-4.5.2, anyio-4.4.0, typeguard-4.4.1 191s asyncio: mode=Mode.STRICT 191s collected 169 items 191s 191s tests/clients/test_django/test_oauth_client.py ............. [ 7%] 191s tests/clients/test_flask/test_oauth_client.py .................... [ 19%] 191s tests/clients/test_flask/test_user_mixin.py ..... [ 22%] 191s tests/clients/test_httpx/test_assertion_client.py .. [ 23%] 192s tests/clients/test_httpx/test_async_assertion_client.py F. [ 24%] 197s tests/clients/test_httpx/test_async_oauth1_client.py FFFFFFF [ 28%] 204s tests/clients/test_httpx/test_async_oauth2_client.py FFFFFFss...FFFFFFF. [ 40%] 205s FFFFF. [ 43%] 205s tests/clients/test_httpx/test_oauth1_client.py ....... [ 47%] 206s tests/clients/test_httpx/test_oauth2_client.py ...................... [ 60%] 206s tests/clients/test_requests/test_assertion_session.py .. [ 62%] 206s tests/clients/test_requests/test_oauth1_session.py ................ [ 71%] 206s tests/clients/test_requests/test_oauth2_session.py ..................... [ 84%] 206s ........... [ 90%] 208s tests/clients/test_starlette/test_oauth_client.py ...FF.FFFF.F [ 97%] 209s tests/clients/test_starlette/test_user_mixin.py F..F [100%] 209s 209s =================================== FAILURES =================================== 209s ______________________________ test_refresh_token ______________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_refresh_token(): 209s async def verifier(request): 209s content = await request.body() 209s if str(request.url) == 'https://i.b/token': 209s assert b'assertion=' in content 209s 209s async with AsyncAssertionClient( 209s 'https://i.b/token', 209s grant_type=AsyncAssertionClient.JWT_BEARER_GRANT_TYPE, 209s issuer='foo', 209s subject='foo', 209s audience='foo', 209s alg='HS256', 209s key='secret', 209s app=AsyncMockDispatch(default_token, assert_func=verifier) 209s ) as client: 209s > await client.get('https://i.b') 209s 209s tests/clients/test_httpx/test_async_assertion_client.py:33: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_client.py:1801: in get 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/assertion_client.py:38: in request 209s await self.refresh_token() 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/assertion_client.py:45: in _refresh_token 209s resp = await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/assertion_client.py:41: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s _____________________ test_fetch_request_token_via_header ______________________ 209s 209s @pytest.mark.asyncio 209s async def test_fetch_request_token_via_header(): 209s request_token = {'oauth_token': '1', 'oauth_token_secret': '2'} 209s 209s async def assert_func(request): 209s auth_header = request.headers.get('authorization') 209s assert 'oauth_consumer_key="id"' in auth_header 209s assert 'oauth_signature=' in auth_header 209s 209s app = AsyncMockDispatch(request_token, assert_func=assert_func) 209s async with AsyncOAuth1Client('id', 'secret', app=app) as client: 209s > response = await client.fetch_request_token(oauth_url) 209s 209s tests/clients/test_httpx/test_async_oauth1_client.py:24: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:70: in _fetch_token 209s token = self.parse_response_token(resp.status_code, to_unicode(text)) 209s /usr/lib/python3/dist-packages/authlib/oauth1/client.py:152: in parse_response_token 209s self.handle_error('fetch_token_denied', message) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s error_type = 'fetch_token_denied' 209s error_description = "Token request failed with code 405, response was ''." 209s 209s @staticmethod 209s def handle_error(error_type, error_description): 209s > raise OAuthError(error_type, error_description) 209s E authlib.integrations.base_client.errors.OAuthError: fetch_token_denied: Token request failed with code 405, response was ''. 209s 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:76: OAuthError 209s ______________________ test_fetch_request_token_via_body _______________________ 209s 209s @pytest.mark.asyncio 209s async def test_fetch_request_token_via_body(): 209s request_token = {'oauth_token': '1', 'oauth_token_secret': '2'} 209s 209s async def assert_func(request): 209s auth_header = request.headers.get('authorization') 209s assert auth_header is None 209s 209s content = await request.body() 209s assert b'oauth_consumer_key=id' in content 209s assert b'&oauth_signature=' in content 209s 209s mock_response = AsyncMockDispatch(request_token, assert_func=assert_func) 209s 209s async with AsyncOAuth1Client( 209s 'id', 'secret', signature_type=SIGNATURE_TYPE_BODY, 209s app=mock_response, 209s ) as client: 209s > response = await client.fetch_request_token(oauth_url) 209s 209s tests/clients/test_httpx/test_async_oauth1_client.py:47: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:70: in _fetch_token 209s token = self.parse_response_token(resp.status_code, to_unicode(text)) 209s /usr/lib/python3/dist-packages/authlib/oauth1/client.py:152: in parse_response_token 209s self.handle_error('fetch_token_denied', message) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s error_type = 'fetch_token_denied' 209s error_description = "Token request failed with code 405, response was ''." 209s 209s @staticmethod 209s def handle_error(error_type, error_description): 209s > raise OAuthError(error_type, error_description) 209s E authlib.integrations.base_client.errors.OAuthError: fetch_token_denied: Token request failed with code 405, response was ''. 209s 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:76: OAuthError 209s ______________________ test_fetch_request_token_via_query ______________________ 209s 209s @pytest.mark.asyncio 209s async def test_fetch_request_token_via_query(): 209s request_token = {'oauth_token': '1', 'oauth_token_secret': '2'} 209s 209s async def assert_func(request): 209s auth_header = request.headers.get('authorization') 209s assert auth_header is None 209s 209s url = str(request.url) 209s assert 'oauth_consumer_key=id' in url 209s assert '&oauth_signature=' in url 209s 209s mock_response = AsyncMockDispatch(request_token, assert_func=assert_func) 209s 209s async with AsyncOAuth1Client( 209s 'id', 'secret', signature_type=SIGNATURE_TYPE_QUERY, 209s app=mock_response, 209s ) as client: 209s > response = await client.fetch_request_token(oauth_url) 209s 209s tests/clients/test_httpx/test_async_oauth1_client.py:70: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:70: in _fetch_token 209s token = self.parse_response_token(resp.status_code, to_unicode(text)) 209s /usr/lib/python3/dist-packages/authlib/oauth1/client.py:152: in parse_response_token 209s self.handle_error('fetch_token_denied', message) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s error_type = 'fetch_token_denied' 209s error_description = "Token request failed with code 405, response was ''." 209s 209s @staticmethod 209s def handle_error(error_type, error_description): 209s > raise OAuthError(error_type, error_description) 209s E authlib.integrations.base_client.errors.OAuthError: fetch_token_denied: Token request failed with code 405, response was ''. 209s 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:76: OAuthError 209s ___________________________ test_fetch_access_token ____________________________ 209s 209s @pytest.mark.asyncio 209s async def test_fetch_access_token(): 209s request_token = {'oauth_token': '1', 'oauth_token_secret': '2'} 209s 209s async def assert_func(request): 209s auth_header = request.headers.get('authorization') 209s assert 'oauth_verifier="d"' in auth_header 209s assert 'oauth_token="foo"' in auth_header 209s assert 'oauth_consumer_key="id"' in auth_header 209s assert 'oauth_signature=' in auth_header 209s 209s mock_response = AsyncMockDispatch(request_token, assert_func=assert_func) 209s async with AsyncOAuth1Client( 209s 'id', 'secret', token='foo', token_secret='bar', 209s app=mock_response, 209s ) as client: 209s with pytest.raises(OAuthError): 209s await client.fetch_access_token(oauth_url) 209s 209s > response = await client.fetch_access_token(oauth_url, verifier='d') 209s 209s tests/clients/test_httpx/test_async_oauth1_client.py:94: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:63: in fetch_access_token 209s token = await self._fetch_token(url, **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:70: in _fetch_token 209s token = self.parse_response_token(resp.status_code, to_unicode(text)) 209s /usr/lib/python3/dist-packages/authlib/oauth1/client.py:152: in parse_response_token 209s self.handle_error('fetch_token_denied', message) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s error_type = 'fetch_token_denied' 209s error_description = "Token request failed with code 405, response was ''." 209s 209s @staticmethod 209s def handle_error(error_type, error_description): 209s > raise OAuthError(error_type, error_description) 209s E authlib.integrations.base_client.errors.OAuthError: fetch_token_denied: Token request failed with code 405, response was ''. 209s 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:76: OAuthError 209s _____________________________ test_get_via_header ______________________________ 209s 209s @pytest.mark.asyncio 209s async def test_get_via_header(): 209s mock_response = AsyncMockDispatch(b'hello') 209s async with AsyncOAuth1Client( 209s 'id', 'secret', token='foo', token_secret='bar', 209s app=mock_response, 209s ) as client: 209s response = await client.get('https://example.com/') 209s 209s > assert response.content == b'hello' 209s E AssertionError: assert b'\n\n' == b'hello' 209s E 209s E At index 0 diff: b'<' != b'h' 209s E Use -v to get more diff 209s 209s tests/clients/test_httpx/test_async_oauth1_client.py:108: AssertionError 209s ______________________________ test_get_via_body _______________________________ 209s 209s @pytest.mark.asyncio 209s async def test_get_via_body(): 209s async def assert_func(request): 209s content = await request.body() 209s assert b'oauth_token=foo' in content 209s assert b'oauth_consumer_key=id' in content 209s assert b'oauth_signature=' in content 209s 209s mock_response = AsyncMockDispatch(b'hello', assert_func=assert_func) 209s async with AsyncOAuth1Client( 209s 'id', 'secret', token='foo', token_secret='bar', 209s signature_type=SIGNATURE_TYPE_BODY, 209s app=mock_response, 209s ) as client: 209s response = await client.post('https://example.com/') 209s 209s > assert response.content == b'hello' 209s E AssertionError: assert b'' == b'hello' 209s E 209s E Use -v to get more diff 209s 209s tests/clients/test_httpx/test_async_oauth1_client.py:132: AssertionError 209s ______________________________ test_get_via_query ______________________________ 209s 209s @pytest.mark.asyncio 209s async def test_get_via_query(): 209s mock_response = AsyncMockDispatch(b'hello') 209s async with AsyncOAuth1Client( 209s 'id', 'secret', token='foo', token_secret='bar', 209s signature_type=SIGNATURE_TYPE_QUERY, 209s app=mock_response, 209s ) as client: 209s response = await client.get('https://example.com/') 209s 209s > assert response.content == b'hello' 209s E AssertionError: assert b'\n\n' == b'hello' 209s E 209s E At index 0 diff: b'<' != b'h' 209s E Use -v to get more diff 209s 209s tests/clients/test_httpx/test_async_oauth1_client.py:149: AssertionError 209s __________ test_add_token_get_request[assert_token_in_header-header] ___________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s assert_func = 209s token_placement = 'header' 209s 209s @pytest.mark.asyncio 209s @pytest.mark.parametrize( 209s "assert_func, token_placement", 209s [ 209s (assert_token_in_header, "header"), 209s (assert_token_in_body, "body"), 209s (assert_token_in_uri, "uri") 209s ] 209s ) 209s async def test_add_token_get_request(assert_func, token_placement): 209s mock_response = AsyncMockDispatch({'a': 'a'}, assert_func=assert_func) 209s async with AsyncOAuth2Client( 209s 'foo', 209s token=default_token, 209s token_placement=token_placement, 209s app=mock_response 209s ) as client: 209s > resp = await client.get('https://i.b') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:62: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_client.py:1801: in get 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ____________ test_add_token_get_request[assert_token_in_body-body] _____________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s assert_func = 209s token_placement = 'body' 209s 209s @pytest.mark.asyncio 209s @pytest.mark.parametrize( 209s "assert_func, token_placement", 209s [ 209s (assert_token_in_header, "header"), 209s (assert_token_in_body, "body"), 209s (assert_token_in_uri, "uri") 209s ] 209s ) 209s async def test_add_token_get_request(assert_func, token_placement): 209s mock_response = AsyncMockDispatch({'a': 'a'}, assert_func=assert_func) 209s async with AsyncOAuth2Client( 209s 'foo', 209s token=default_token, 209s token_placement=token_placement, 209s app=mock_response 209s ) as client: 209s > resp = await client.get('https://i.b') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:62: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_client.py:1801: in get 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s _____________ test_add_token_get_request[assert_token_in_uri-uri] ______________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s assert_func = 209s token_placement = 'uri' 209s 209s @pytest.mark.asyncio 209s @pytest.mark.parametrize( 209s "assert_func, token_placement", 209s [ 209s (assert_token_in_header, "header"), 209s (assert_token_in_body, "body"), 209s (assert_token_in_uri, "uri") 209s ] 209s ) 209s async def test_add_token_get_request(assert_func, token_placement): 209s mock_response = AsyncMockDispatch({'a': 'a'}, assert_func=assert_func) 209s async with AsyncOAuth2Client( 209s 'foo', 209s token=default_token, 209s token_placement=token_placement, 209s app=mock_response 209s ) as client: 209s > resp = await client.get('https://i.b') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:62: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_client.py:1801: in get 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ______ test_add_token_to_streaming_request[assert_token_in_header-header] ______ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s assert_func = 209s token_placement = 'header' 209s 209s @pytest.mark.asyncio 209s @pytest.mark.parametrize( 209s "assert_func, token_placement", 209s [ 209s (assert_token_in_header, "header"), 209s (assert_token_in_body, "body"), 209s (assert_token_in_uri, "uri") 209s ] 209s ) 209s async def test_add_token_to_streaming_request(assert_func, token_placement): 209s mock_response = AsyncMockDispatch({'a': 'a'}, assert_func=assert_func) 209s async with AsyncOAuth2Client( 209s 'foo', 209s token=default_token, 209s token_placement=token_placement, 209s app=mock_response 209s ) as client: 209s > async with client.stream("GET", 'https://i.b') as stream: 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:85: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3.12/contextlib.py:210: in __aenter__ 209s return await anext(self.gen) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:103: in stream 209s async with super().stream( 209s /usr/lib/python3.12/contextlib.py:210: in __aenter__ 209s return await anext(self.gen) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1617: in stream 209s response = await self.send( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ________ test_add_token_to_streaming_request[assert_token_in_body-body] ________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s assert_func = 209s token_placement = 'body' 209s 209s @pytest.mark.asyncio 209s @pytest.mark.parametrize( 209s "assert_func, token_placement", 209s [ 209s (assert_token_in_header, "header"), 209s (assert_token_in_body, "body"), 209s (assert_token_in_uri, "uri") 209s ] 209s ) 209s async def test_add_token_to_streaming_request(assert_func, token_placement): 209s mock_response = AsyncMockDispatch({'a': 'a'}, assert_func=assert_func) 209s async with AsyncOAuth2Client( 209s 'foo', 209s token=default_token, 209s token_placement=token_placement, 209s app=mock_response 209s ) as client: 209s > async with client.stream("GET", 'https://i.b') as stream: 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:85: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3.12/contextlib.py:210: in __aenter__ 209s return await anext(self.gen) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:103: in stream 209s async with super().stream( 209s /usr/lib/python3.12/contextlib.py:210: in __aenter__ 209s return await anext(self.gen) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1617: in stream 209s response = await self.send( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s _________ test_add_token_to_streaming_request[assert_token_in_uri-uri] _________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s assert_func = 209s token_placement = 'uri' 209s 209s @pytest.mark.asyncio 209s @pytest.mark.parametrize( 209s "assert_func, token_placement", 209s [ 209s (assert_token_in_header, "header"), 209s (assert_token_in_body, "body"), 209s (assert_token_in_uri, "uri") 209s ] 209s ) 209s async def test_add_token_to_streaming_request(assert_func, token_placement): 209s mock_response = AsyncMockDispatch({'a': 'a'}, assert_func=assert_func) 209s async with AsyncOAuth2Client( 209s 'foo', 209s token=default_token, 209s token_placement=token_placement, 209s app=mock_response 209s ) as client: 209s > async with client.stream("GET", 'https://i.b') as stream: 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:85: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3.12/contextlib.py:210: in __aenter__ 209s return await anext(self.gen) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:103: in stream 209s async with super().stream( 209s /usr/lib/python3.12/contextlib.py:210: in __aenter__ 209s return await anext(self.gen) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1617: in stream 209s response = await self.send( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ____________________________ test_fetch_token_post _____________________________ 209s 209s @pytest.mark.asyncio 209s async def test_fetch_token_post(): 209s url = 'https://example.com/token' 209s 209s async def assert_func(request): 209s content = await request.body() 209s content = content.decode() 209s assert 'code=v' in content 209s assert 'client_id=' in content 209s assert 'grant_type=authorization_code' in content 209s 209s mock_response = AsyncMockDispatch(default_token, assert_func=assert_func) 209s async with AsyncOAuth2Client('foo', app=mock_response) as client: 209s > token = await client.fetch_token(url, authorization_response='https://i.b/?code=v') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:156: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:138: in _fetch_token 209s return self.parse_response_token(resp) 209s /usr/lib/python3/dist-packages/authlib/oauth2/client.py:353: in parse_response_token 209s token = resp.json() 209s /usr/lib/python3/dist-packages/httpx/_models.py:764: in json 209s return jsonlib.loads(self.content, **kwargs) 209s /usr/lib/python3.12/json/__init__.py:346: in loads 209s return _default_decoder.decode(s) 209s /usr/lib/python3.12/json/decoder.py:338: in decode 209s obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = , s = '', idx = 0 209s 209s def raw_decode(self, s, idx=0): 209s """Decode a JSON document from ``s`` (a ``str`` beginning with 209s a JSON document) and return a 2-tuple of the Python 209s representation and the index in ``s`` where the document ended. 209s 209s This can be used to decode a JSON document from a string that may 209s have extraneous data at the end. 209s 209s """ 209s try: 209s obj, end = self.scan_once(s, idx) 209s except StopIteration as err: 209s > raise JSONDecodeError("Expecting value", s, err.value) from None 209s E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 209s 209s /usr/lib/python3.12/json/decoder.py:356: JSONDecodeError 209s _____________________________ test_fetch_token_get _____________________________ 209s 209s @pytest.mark.asyncio 209s async def test_fetch_token_get(): 209s url = 'https://example.com/token' 209s 209s async def assert_func(request): 209s url = str(request.url) 209s assert 'code=v' in url 209s assert 'client_id=' in url 209s assert 'grant_type=authorization_code' in url 209s 209s mock_response = AsyncMockDispatch(default_token, assert_func=assert_func) 209s async with AsyncOAuth2Client('foo', app=mock_response) as client: 209s authorization_response = 'https://i.b/?code=v' 209s > token = await client.fetch_token( 209s url, authorization_response=authorization_response, method='GET') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:186: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:138: in _fetch_token 209s return self.parse_response_token(resp) 209s /usr/lib/python3/dist-packages/authlib/oauth2/client.py:353: in parse_response_token 209s token = resp.json() 209s /usr/lib/python3/dist-packages/httpx/_models.py:764: in json 209s return jsonlib.loads(self.content, **kwargs) 209s /usr/lib/python3.12/json/__init__.py:346: in loads 209s return _default_decoder.decode(s) 209s /usr/lib/python3.12/json/decoder.py:338: in decode 209s obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s s = '\n\n\n Example Domain\n\n \n \n

More information...

\n\n\n\n' 209s idx = 0 209s 209s def raw_decode(self, s, idx=0): 209s """Decode a JSON document from ``s`` (a ``str`` beginning with 209s a JSON document) and return a 2-tuple of the Python 209s representation and the index in ``s`` where the document ended. 209s 209s This can be used to decode a JSON document from a string that may 209s have extraneous data at the end. 209s 209s """ 209s try: 209s obj, end = self.scan_once(s, idx) 209s except StopIteration as err: 209s > raise JSONDecodeError("Expecting value", s, err.value) from None 209s E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 209s 209s /usr/lib/python3.12/json/decoder.py:356: JSONDecodeError 209s __________________ test_token_auth_method_client_secret_post ___________________ 209s 209s @pytest.mark.asyncio 209s async def test_token_auth_method_client_secret_post(): 209s url = 'https://example.com/token' 209s 209s async def assert_func(request): 209s content = await request.body() 209s content = content.decode() 209s assert 'code=v' in content 209s assert 'client_id=' in content 209s assert 'client_secret=bar' in content 209s assert 'grant_type=authorization_code' in content 209s 209s mock_response = AsyncMockDispatch(default_token, assert_func=assert_func) 209s async with AsyncOAuth2Client( 209s 'foo', 'bar', 209s token_endpoint_auth_method='client_secret_post', 209s app=mock_response 209s ) as client: 209s > token = await client.fetch_token(url, code='v') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:220: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:138: in _fetch_token 209s return self.parse_response_token(resp) 209s /usr/lib/python3/dist-packages/authlib/oauth2/client.py:353: in parse_response_token 209s token = resp.json() 209s /usr/lib/python3/dist-packages/httpx/_models.py:764: in json 209s return jsonlib.loads(self.content, **kwargs) 209s /usr/lib/python3.12/json/__init__.py:346: in loads 209s return _default_decoder.decode(s) 209s /usr/lib/python3.12/json/decoder.py:338: in decode 209s obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = , s = '', idx = 0 209s 209s def raw_decode(self, s, idx=0): 209s """Decode a JSON document from ``s`` (a ``str`` beginning with 209s a JSON document) and return a 2-tuple of the Python 209s representation and the index in ``s`` where the document ended. 209s 209s This can be used to decode a JSON document from a string that may 209s have extraneous data at the end. 209s 209s """ 209s try: 209s obj, end = self.scan_once(s, idx) 209s except StopIteration as err: 209s > raise JSONDecodeError("Expecting value", s, err.value) from None 209s E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 209s 209s /usr/lib/python3.12/json/decoder.py:356: JSONDecodeError 209s _______________________ test_access_token_response_hook ________________________ 209s 209s @pytest.mark.asyncio 209s async def test_access_token_response_hook(): 209s url = 'https://example.com/token' 209s 209s def _access_token_response_hook(resp): 209s assert resp.json() == default_token 209s return resp 209s 209s access_token_response_hook = mock.Mock(side_effect=_access_token_response_hook) 209s app = AsyncMockDispatch(default_token) 209s async with AsyncOAuth2Client('foo', token=default_token, app=app) as sess: 209s sess.register_compliance_hook( 209s 'access_token_response', 209s access_token_response_hook 209s ) 209s > assert await sess.fetch_token(url) == default_token 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:240: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:136: in _fetch_token 209s resp = hook(resp) 209s /usr/lib/python3.12/unittest/mock.py:1139: in __call__ 209s return self._mock_call(*args, **kwargs) 209s /usr/lib/python3.12/unittest/mock.py:1143: in _mock_call 209s return self._execute_mock_call(*args, **kwargs) 209s /usr/lib/python3.12/unittest/mock.py:1204: in _execute_mock_call 209s result = effect(*args, **kwargs) 209s tests/clients/test_httpx/test_async_oauth2_client.py:230: in _access_token_response_hook 209s assert resp.json() == default_token 209s /usr/lib/python3/dist-packages/httpx/_models.py:764: in json 209s return jsonlib.loads(self.content, **kwargs) 209s /usr/lib/python3.12/json/__init__.py:346: in loads 209s return _default_decoder.decode(s) 209s /usr/lib/python3.12/json/decoder.py:338: in decode 209s obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = , s = '', idx = 0 209s 209s def raw_decode(self, s, idx=0): 209s """Decode a JSON document from ``s`` (a ``str`` beginning with 209s a JSON document) and return a 2-tuple of the Python 209s representation and the index in ``s`` where the document ended. 209s 209s This can be used to decode a JSON document from a string that may 209s have extraneous data at the end. 209s 209s """ 209s try: 209s obj, end = self.scan_once(s, idx) 209s except StopIteration as err: 209s > raise JSONDecodeError("Expecting value", s, err.value) from None 209s E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 209s 209s /usr/lib/python3.12/json/decoder.py:356: JSONDecodeError 209s ___________________________ test_password_grant_type ___________________________ 209s 209s @pytest.mark.asyncio 209s async def test_password_grant_type(): 209s url = 'https://example.com/token' 209s 209s async def assert_func(request): 209s content = await request.body() 209s content = content.decode() 209s assert 'username=v' in content 209s assert 'scope=profile' in content 209s assert 'grant_type=password' in content 209s 209s app = AsyncMockDispatch(default_token, assert_func=assert_func) 209s async with AsyncOAuth2Client('foo', scope='profile', app=app) as sess: 209s > token = await sess.fetch_token(url, username='v', password='v') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:257: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:138: in _fetch_token 209s return self.parse_response_token(resp) 209s /usr/lib/python3/dist-packages/authlib/oauth2/client.py:353: in parse_response_token 209s token = resp.json() 209s /usr/lib/python3/dist-packages/httpx/_models.py:764: in json 209s return jsonlib.loads(self.content, **kwargs) 209s /usr/lib/python3.12/json/__init__.py:346: in loads 209s return _default_decoder.decode(s) 209s /usr/lib/python3.12/json/decoder.py:338: in decode 209s obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = , s = '', idx = 0 209s 209s def raw_decode(self, s, idx=0): 209s """Decode a JSON document from ``s`` (a ``str`` beginning with 209s a JSON document) and return a 2-tuple of the Python 209s representation and the index in ``s`` where the document ended. 209s 209s This can be used to decode a JSON document from a string that may 209s have extraneous data at the end. 209s 209s """ 209s try: 209s obj, end = self.scan_once(s, idx) 209s except StopIteration as err: 209s > raise JSONDecodeError("Expecting value", s, err.value) from None 209s E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 209s 209s /usr/lib/python3.12/json/decoder.py:356: JSONDecodeError 209s _________________________ test_client_credentials_type _________________________ 209s 209s @pytest.mark.asyncio 209s async def test_client_credentials_type(): 209s url = 'https://example.com/token' 209s 209s async def assert_func(request): 209s content = await request.body() 209s content = content.decode() 209s assert 'scope=profile' in content 209s assert 'grant_type=client_credentials' in content 209s 209s app = AsyncMockDispatch(default_token, assert_func=assert_func) 209s async with AsyncOAuth2Client('foo', scope='profile', app=app) as sess: 209s > token = await sess.fetch_token(url) 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:277: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:138: in _fetch_token 209s return self.parse_response_token(resp) 209s /usr/lib/python3/dist-packages/authlib/oauth2/client.py:353: in parse_response_token 209s token = resp.json() 209s /usr/lib/python3/dist-packages/httpx/_models.py:764: in json 209s return jsonlib.loads(self.content, **kwargs) 209s /usr/lib/python3.12/json/__init__.py:346: in loads 209s return _default_decoder.decode(s) 209s /usr/lib/python3.12/json/decoder.py:338: in decode 209s obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = , s = '', idx = 0 209s 209s def raw_decode(self, s, idx=0): 209s """Decode a JSON document from ``s`` (a ``str`` beginning with 209s a JSON document) and return a 2-tuple of the Python 209s representation and the index in ``s`` where the document ended. 209s 209s This can be used to decode a JSON document from a string that may 209s have extraneous data at the end. 209s 209s """ 209s try: 209s obj, end = self.scan_once(s, idx) 209s except StopIteration as err: 209s > raise JSONDecodeError("Expecting value", s, err.value) from None 209s E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 209s 209s /usr/lib/python3.12/json/decoder.py:356: JSONDecodeError 209s ______________ test_cleans_previous_token_before_fetching_new_one ______________ 209s 209s @pytest.mark.asyncio 209s async def test_cleans_previous_token_before_fetching_new_one(): 209s now = int(time.time()) 209s new_token = deepcopy(default_token) 209s past = now - 7200 209s default_token['expires_at'] = past 209s new_token['expires_at'] = now + 3600 209s url = 'https://example.com/token' 209s 209s app = AsyncMockDispatch(new_token) 209s with mock.patch('time.time', lambda: now): 209s async with AsyncOAuth2Client('foo', token=default_token, app=app) as sess: 209s > assert await sess.fetch_token(url) == new_token 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:296: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:138: in _fetch_token 209s return self.parse_response_token(resp) 209s /usr/lib/python3/dist-packages/authlib/oauth2/client.py:353: in parse_response_token 209s token = resp.json() 209s /usr/lib/python3/dist-packages/httpx/_models.py:764: in json 209s return jsonlib.loads(self.content, **kwargs) 209s /usr/lib/python3.12/json/__init__.py:346: in loads 209s return _default_decoder.decode(s) 209s /usr/lib/python3.12/json/decoder.py:338: in decode 209s obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = , s = '', idx = 0 209s 209s def raw_decode(self, s, idx=0): 209s """Decode a JSON document from ``s`` (a ``str`` beginning with 209s a JSON document) and return a 2-tuple of the Python 209s representation and the index in ``s`` where the document ended. 209s 209s This can be used to decode a JSON document from a string that may 209s have extraneous data at the end. 209s 209s """ 209s try: 209s obj, end = self.scan_once(s, idx) 209s except StopIteration as err: 209s > raise JSONDecodeError("Expecting value", s, err.value) from None 209s E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 209s 209s /usr/lib/python3.12/json/decoder.py:356: JSONDecodeError 209s ___________________________ test_auto_refresh_token ____________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_auto_refresh_token(): 209s 209s async def _update_token(token, refresh_token=None, access_token=None): 209s assert refresh_token == 'b' 209s assert token == default_token 209s 209s update_token = mock.Mock(side_effect=_update_token) 209s 209s old_token = dict( 209s access_token='a', refresh_token='b', 209s token_type='bearer', expires_at=100 209s ) 209s 209s app = AsyncMockDispatch(default_token) 209s async with AsyncOAuth2Client( 209s 'foo', token=old_token, token_endpoint='https://i.b/token', 209s update_token=update_token, app=app 209s ) as sess: 209s > await sess.get('https://i.b/user') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:324: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_client.py:1801: in get 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:86: in request 209s await self.ensure_active_token(self.token) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:113: in ensure_active_token 209s await self.refresh_token(url, refresh_token=refresh_token) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:142: in _refresh_token 209s resp = await self.post( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1892: in post 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ___________________________ test_auto_refresh_token2 ___________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_auto_refresh_token2(): 209s 209s async def _update_token(token, refresh_token=None, access_token=None): 209s assert access_token == 'a' 209s assert token == default_token 209s 209s update_token = mock.Mock(side_effect=_update_token) 209s 209s old_token = dict( 209s access_token='a', 209s token_type='bearer', 209s expires_at=100 209s ) 209s 209s app = AsyncMockDispatch(default_token) 209s 209s async with AsyncOAuth2Client( 209s 'foo', token=old_token, 209s token_endpoint='https://i.b/token', 209s grant_type='client_credentials', 209s app=app, 209s ) as client: 209s > await client.get('https://i.b/user') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:363: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_client.py:1801: in get 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:86: in request 209s await self.ensure_active_token(self.token) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:116: in ensure_active_token 209s new_token = await self.fetch_token(url, grant_type='client_credentials') 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:125: in _fetch_token 209s resp = await self.post( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1892: in post 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ___________________________ test_auto_refresh_token3 ___________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_auto_refresh_token3(): 209s async def _update_token(token, refresh_token=None, access_token=None): 209s assert access_token == 'a' 209s assert token == default_token 209s 209s update_token = mock.Mock(side_effect=_update_token) 209s 209s old_token = dict( 209s access_token='a', 209s token_type='bearer', 209s expires_at=100 209s ) 209s 209s app = AsyncMockDispatch(default_token) 209s 209s async with AsyncOAuth2Client( 209s 'foo', token=old_token, token_endpoint='https://i.b/token', 209s update_token=update_token, grant_type='client_credentials', 209s app=app, 209s ) as client: 209s > await client.post('https://i.b/user', json={'foo': 'bar'}) 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:396: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_client.py:1892: in post 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:86: in request 209s await self.ensure_active_token(self.token) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:116: in ensure_active_token 209s new_token = await self.fetch_token(url, grant_type='client_credentials') 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:125: in _fetch_token 209s resp = await self.post( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1892: in post 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ___________________________ test_auto_refresh_token4 ___________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_auto_refresh_token4(): 209s async def _update_token(token, refresh_token=None, access_token=None): 209s # This test only makes sense if the expired token is refreshed 209s token["expires_at"] = int(time.time()) + 3600 209s # artificial sleep to force other coroutines to wake 209s await asyncio.sleep(0.1) 209s 209s update_token = mock.Mock(side_effect=_update_token) 209s 209s old_token = dict( 209s access_token='old', 209s token_type='bearer', 209s expires_at=100 209s ) 209s 209s app = AsyncMockDispatch(default_token) 209s 209s async with AsyncOAuth2Client( 209s 'foo', token=old_token, token_endpoint='https://i.b/token', 209s update_token=update_token, grant_type='client_credentials', 209s app=app, 209s ) as client: 209s coroutines = [client.get('https://i.b/user') for x in range(10)] 209s > await asyncio.gather(*coroutines) 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:423: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_client.py:1801: in get 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:86: in request 209s await self.ensure_active_token(self.token) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:116: in ensure_active_token 209s new_token = await self.fetch_token(url, grant_type='client_credentials') 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:125: in _fetch_token 209s resp = await self.post( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1892: in post 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ______________________________ test_revoke_token _______________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_revoke_token(): 209s answer = {'status': 'ok'} 209s app = AsyncMockDispatch(answer) 209s 209s async with AsyncOAuth2Client('a', app=app) as sess: 209s > resp = await sess.revoke_token('https://i.b/token', 'hi') 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py:432: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_client.py:1892: in post 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ____________________________ test_oauth1_authorize _____________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_oauth1_authorize(): 209s oauth = OAuth() 209s app = AsyncPathMapDispatch({ 209s '/request-token': {'body': 'oauth_token=foo&oauth_verifier=baz'}, 209s '/token': {'body': 'oauth_token=a&oauth_token_secret=b'}, 209s }) 209s client = oauth.register( 209s 'dev', 209s client_id='dev', 209s client_secret='dev', 209s request_token_url='https://i.b/request-token', 209s api_base_url='https://i.b/api', 209s access_token_url='https://i.b/token', 209s authorize_url='https://i.b/authorize', 209s client_kwargs={ 209s 'app': app, 209s } 209s ) 209s 209s req_scope = {'type': 'http', 'session': {}} 209s req = Request(req_scope) 209s > resp = await client.authorize_redirect(req, 'https://b.com/bar') 209s 209s tests/clients/test_starlette/test_oauth_client.py:62: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/starlette_client/apps.py:34: in authorize_redirect 209s rv = await self.create_authorization_url(redirect_uri, **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:38: in create_authorization_url 209s request_token = await client.fetch_request_token(self.request_token_url, **params) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth1_client.py:68: in _fetch_token 209s resp = await self.post(url, **kwargs) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1892: in post 209s return await self.request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ____________________________ test_oauth2_authorize _____________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_oauth2_authorize(): 209s oauth = OAuth() 209s app = AsyncPathMapDispatch({ 209s '/token': {'body': get_bearer_token()} 209s }) 209s client = oauth.register( 209s 'dev', 209s client_id='dev', 209s client_secret='dev', 209s api_base_url='https://i.b/api', 209s access_token_url='https://i.b/token', 209s authorize_url='https://i.b/authorize', 209s client_kwargs={ 209s 'app': app, 209s } 209s ) 209s 209s req_scope = {'type': 'http', 'session': {}} 209s req = Request(req_scope) 209s resp = await client.authorize_redirect(req, 'https://b.com/bar') 209s assert resp.status_code == 302 209s url = resp.headers.get('Location') 209s assert 'state=' in url 209s state = dict(url_decode(urlparse.urlparse(url).query))['state'] 209s 209s assert f'_state_dev_{state}' in req.session 209s 209s req_scope.update( 209s { 209s 'path': '/', 209s 'query_string': f'code=a&state={state}', 209s 'session': req.session, 209s } 209s ) 209s req = Request(req_scope) 209s > token = await client.authorize_access_token(req) 209s 209s tests/clients/test_starlette/test_oauth_client.py:108: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/starlette_client/apps.py:81: in authorize_access_token 209s token = await self.fetch_access_token(**params, **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:125: in fetch_access_token 209s token = await client.fetch_token(token_endpoint, **params) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:125: in _fetch_token 209s resp = await self.post( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1892: in post 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s _____________________ test_oauth2_authorize_code_challenge _____________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_oauth2_authorize_code_challenge(): 209s app = AsyncPathMapDispatch({ 209s '/token': {'body': get_bearer_token()} 209s }) 209s oauth = OAuth() 209s client = oauth.register( 209s 'dev', 209s client_id='dev', 209s api_base_url='https://i.b/api', 209s access_token_url='https://i.b/token', 209s authorize_url='https://i.b/authorize', 209s client_kwargs={ 209s 'code_challenge_method': 'S256', 209s 'app': app, 209s }, 209s ) 209s 209s req_scope = {'type': 'http', 'session': {}} 209s req = Request(req_scope) 209s 209s resp = await client.authorize_redirect(req, redirect_uri='https://b.com/bar') 209s assert resp.status_code == 302 209s 209s url = resp.headers.get('Location') 209s assert 'code_challenge=' in url 209s assert 'code_challenge_method=S256' in url 209s 209s state = dict(url_decode(urlparse.urlparse(url).query))['state'] 209s state_data = req.session[f'_state_dev_{state}']['data'] 209s 209s verifier = state_data['code_verifier'] 209s assert verifier is not None 209s 209s req_scope.update( 209s { 209s 'path': '/', 209s 'query_string': f'code=a&state={state}'.encode(), 209s 'session': req.session, 209s } 209s ) 209s req = Request(req_scope) 209s 209s > token = await client.authorize_access_token(req) 209s 209s tests/clients/test_starlette/test_oauth_client.py:183: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/starlette_client/apps.py:81: in authorize_access_token 209s token = await self.fetch_access_token(**params, **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:125: in fetch_access_token 209s token = await client.fetch_token(token_endpoint, **params) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:125: in _fetch_token 209s resp = await self.post( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1892: in post 209s return await self.request( 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ______________________ test_with_fetch_token_in_register _______________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_with_fetch_token_in_register(): 209s async def fetch_token(request): 209s return {'access_token': 'dev', 'token_type': 'bearer'} 209s 209s app = AsyncPathMapDispatch({ 209s '/user': {'body': {'sub': '123'}} 209s }) 209s oauth = OAuth() 209s client = oauth.register( 209s 'dev', 209s client_id='dev', 209s client_secret='dev', 209s api_base_url='https://i.b/api', 209s access_token_url='https://i.b/token', 209s authorize_url='https://i.b/authorize', 209s fetch_token=fetch_token, 209s client_kwargs={ 209s 'app': app, 209s } 209s ) 209s 209s req_scope = {'type': 'http', 'session': {}} 209s req = Request(req_scope) 209s > resp = await client.get('/user', request=req) 209s 209s tests/clients/test_starlette/test_oauth_client.py:211: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:86: in request 209s return await _http_request(self, session, method, url, token, kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:144: in _http_request 209s return await session.request(method, url, **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s ________________________ test_with_fetch_token_in_oauth ________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_with_fetch_token_in_oauth(): 209s async def fetch_token(name, request): 209s return {'access_token': 'dev', 'token_type': 'bearer'} 209s 209s app = AsyncPathMapDispatch({ 209s '/user': {'body': {'sub': '123'}} 209s }) 209s oauth = OAuth(fetch_token=fetch_token) 209s client = oauth.register( 209s 'dev', 209s client_id='dev', 209s client_secret='dev', 209s api_base_url='https://i.b/api', 209s access_token_url='https://i.b/token', 209s authorize_url='https://i.b/authorize', 209s client_kwargs={ 209s 'app': app, 209s } 209s ) 209s 209s req_scope = {'type': 'http', 'session': {}} 209s req = Request(req_scope) 209s > resp = await client.get('/user', request=req) 209s 209s tests/clients/test_starlette/test_oauth_client.py:238: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:86: in request 209s return await _http_request(self, session, method, url, token, kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:144: in _http_request 209s return await session.request(method, url, **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s _________________________ test_request_withhold_token __________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_request_withhold_token(): 209s oauth = OAuth() 209s app = AsyncPathMapDispatch({ 209s '/user': {'body': {'sub': '123'}} 209s }) 209s client = oauth.register( 209s "dev", 209s client_id="dev", 209s client_secret="dev", 209s api_base_url="https://i.b/api", 209s access_token_url="https://i.b/token", 209s authorize_url="https://i.b/authorize", 209s client_kwargs={ 209s 'app': app, 209s } 209s ) 209s req_scope = {'type': 'http', 'session': {}} 209s req = Request(req_scope) 209s > resp = await client.get('/user', request=req, withhold_token=True) 209s 209s tests/clients/test_starlette/test_oauth_client.py:261: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:86: in request 209s return await _http_request(self, session, method, url, token, kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:136: in _http_request 209s return await session.request(method, url, **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s _____________________ test_oauth2_authorize_with_metadata ______________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_oauth2_authorize_with_metadata(): 209s oauth = OAuth() 209s app = AsyncPathMapDispatch({ 209s '/.well-known/openid-configuration': {'body': { 209s 'authorization_endpoint': 'https://i.b/authorize' 209s }} 209s }) 209s client = oauth.register( 209s 'dev', 209s client_id='dev', 209s client_secret='dev', 209s api_base_url='https://i.b/api', 209s access_token_url='https://i.b/token', 209s server_metadata_url='https://i.b/.well-known/openid-configuration', 209s client_kwargs={ 209s 'app': app, 209s } 209s ) 209s req_scope = {'type': 'http', 'session': {}} 209s req = Request(req_scope) 209s > resp = await client.authorize_redirect(req, 'https://b.com/bar') 209s 209s tests/clients/test_starlette/test_oauth_client.py:302: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/starlette_client/apps.py:34: in authorize_redirect 209s rv = await self.create_authorization_url(redirect_uri, **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:95: in create_authorization_url 209s metadata = await self.load_server_metadata() 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:76: in load_server_metadata 209s resp = await client.request('GET', self._server_metadata_url, withhold_token=True) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s _____________________________ test_fetch_userinfo ______________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_fetch_userinfo(): 209s > await run_fetch_userinfo({'sub': '123'}) 209s 209s tests/clients/test_starlette/test_user_mixin.py:42: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s tests/clients/test_starlette/test_user_mixin.py:36: in run_fetch_userinfo 209s user = await client.userinfo(request=req) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_openid.py:29: in userinfo 209s resp = await self.get(metadata['userinfo_endpoint'], **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:86: in request 209s return await _http_request(self, session, method, url, token, kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_app.py:144: in _http_request 209s return await session.request(method, url, **kwargs) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s __________________________ test_force_fetch_jwks_uri ___________________________ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s > yield 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:69: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request 209s resp = await self._pool.handle_async_request(req) 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request 209s raise exc from None 209s /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request 209s response = await connection.handle_async_request( 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s self = 209s request = 209s 209s async def handle_async_request(self, request: Request) -> Response: 209s timeouts = request.extensions.get("timeout", {}) 209s timeout = timeouts.get("connect", None) 209s 209s async with self._connect_lock: 209s if not self._connected: 209s target = b"%b:%d" % (self._remote_origin.host, self._remote_origin.port) 209s 209s connect_url = URL( 209s scheme=self._proxy_origin.scheme, 209s host=self._proxy_origin.host, 209s port=self._proxy_origin.port, 209s target=target, 209s ) 209s connect_headers = merge_headers( 209s [(b"Host", target), (b"Accept", b"*/*")], self._proxy_headers 209s ) 209s connect_request = Request( 209s method=b"CONNECT", 209s url=connect_url, 209s headers=connect_headers, 209s extensions=request.extensions, 209s ) 209s connect_response = await self._connection.handle_async_request( 209s connect_request 209s ) 209s 209s if connect_response.status < 200 or connect_response.status > 299: 209s reason_bytes = connect_response.extensions.get("reason_phrase", b"") 209s reason_str = reason_bytes.decode("ascii", errors="ignore") 209s msg = "%d %s" % (connect_response.status, reason_str) 209s await self._connection.aclose() 209s > raise ProxyError(msg) 209s E httpcore.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:298: ProxyError 209s 209s The above exception was the direct cause of the following exception: 209s 209s @pytest.mark.asyncio 209s async def test_force_fetch_jwks_uri(): 209s secret_keys = read_key_file('jwks_private.json') 209s token = get_bearer_token() 209s id_token = generate_id_token( 209s token, {'sub': '123'}, secret_keys, 209s alg='RS256', iss='https://i.b', 209s aud='dev', exp=3600, nonce='n', 209s ) 209s token['id_token'] = id_token 209s 209s app = AsyncPathMapDispatch({ 209s '/jwks': {'body': read_key_file('jwks_public.json')} 209s }) 209s 209s oauth = OAuth() 209s client = oauth.register( 209s 'dev', 209s client_id='dev', 209s client_secret='dev', 209s fetch_token=get_bearer_token, 209s jwks_uri='https://i.b/jwks', 209s issuer='https://i.b', 209s client_kwargs={ 209s 'app': app, 209s } 209s ) 209s > user = await client.parse_id_token(token, nonce='n') 209s 209s tests/clients/test_starlette/test_user_mixin.py:129: 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_openid.py:56: in parse_id_token 209s jwk_set = await self.fetch_jwk_set() 209s /usr/lib/python3/dist-packages/authlib/integrations/base_client/async_openid.py:19: in fetch_jwk_set 209s resp = await client.request('GET', uri, withhold_token=True) 209s /usr/lib/python3/dist-packages/authlib/integrations/httpx_client/oauth2_client.py:90: in request 209s return await super().request( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request 209s return await self.send(request, auth=auth, follow_redirects=follow_redirects) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1661: in send 209s response = await self._send_handling_auth( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth 209s response = await self._send_handling_redirects( 209s /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects 209s response = await self._send_single_request(request) 209s /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request 209s response = await transport.handle_async_request(request) 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request 209s with map_httpcore_exceptions(): 209s /usr/lib/python3.12/contextlib.py:158: in __exit__ 209s self.gen.throw(value) 209s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 209s 209s @contextlib.contextmanager 209s def map_httpcore_exceptions() -> typing.Iterator[None]: 209s try: 209s yield 209s except Exception as exc: 209s mapped_exc = None 209s 209s for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): 209s if not isinstance(exc, from_exc): 209s continue 209s # We want to map to the most specific exception we can find. 209s # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to 209s # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. 209s if mapped_exc is None or issubclass(to_exc, mapped_exc): 209s mapped_exc = to_exc 209s 209s if mapped_exc is None: # pragma: no cover 209s raise 209s 209s message = str(exc) 209s > raise mapped_exc(message) from exc 209s E httpx.ProxyError: 503 Service Unavailable 209s 209s /usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ProxyError 209s =============================== warnings summary =============================== 209s ../../../usr/lib/python3/dist-packages/httpx/_client.py:1426: 2 warnings 209s tests/clients/test_httpx/test_async_assertion_client.py: 2 warnings 209s tests/clients/test_httpx/test_async_oauth1_client.py: 7 warnings 209s tests/clients/test_httpx/test_async_oauth2_client.py: 19 warnings 209s tests/clients/test_starlette/test_oauth_client.py: 9 warnings 209s tests/clients/test_starlette/test_user_mixin.py: 2 warnings 209s /usr/lib/python3/dist-packages/httpx/_client.py:1426: DeprecationWarning: The 'app' shortcut is now deprecated. Use the explicit style 'transport=ASGITransport(app=...)' instead. 209s warnings.warn(message, DeprecationWarning) 209s 209s tests/clients/test_flask/test_oauth_client.py::FlaskOAuthTest::test_openid_authorize 209s /usr/lib/python3/dist-packages/authlib/jose/jwk.py:14: AuthlibDeprecationWarning: Please use ``JsonWebKey`` directly. 209s deprecate('Please use ``JsonWebKey`` directly.') 209s 209s tests/clients/test_httpx/test_assertion_client.py: 3 warnings 209s tests/clients/test_httpx/test_oauth1_client.py: 7 warnings 209s tests/clients/test_httpx/test_oauth2_client.py: 23 warnings 209s /usr/lib/python3/dist-packages/httpx/_client.py:680: DeprecationWarning: The 'app' shortcut is now deprecated. Use the explicit style 'transport=WSGITransport(app=...)' instead. 209s warnings.warn(message, DeprecationWarning) 209s 209s tests/clients/test_httpx/test_async_oauth2_client.py::test_httpx_client_stream_match[client0] 209s tests/clients/test_httpx/test_async_oauth2_client.py::test_httpx_client_stream_match[client1] 209s /usr/lib/python3/dist-packages/_pytest/python.py:148: PytestUnhandledCoroutineWarning: async def functions are not natively supported and have been skipped. 209s You need to install a suitable plugin for your async framework, for example: 209s - anyio 209s - pytest-asyncio 209s - pytest-tornasync 209s - pytest-trio 209s - pytest-twisted 209s warnings.warn(PytestUnhandledCoroutineWarning(msg.format(nodeid))) 209s 209s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 209s =========================== short test summary info ============================ 209s FAILED tests/clients/test_httpx/test_async_assertion_client.py::test_refresh_token 209s FAILED tests/clients/test_httpx/test_async_oauth1_client.py::test_fetch_request_token_via_header 209s FAILED tests/clients/test_httpx/test_async_oauth1_client.py::test_fetch_request_token_via_body 209s FAILED tests/clients/test_httpx/test_async_oauth1_client.py::test_fetch_request_token_via_query 209s FAILED tests/clients/test_httpx/test_async_oauth1_client.py::test_fetch_access_token 209s FAILED tests/clients/test_httpx/test_async_oauth1_client.py::test_get_via_header 209s FAILED tests/clients/test_httpx/test_async_oauth1_client.py::test_get_via_body 209s FAILED tests/clients/test_httpx/test_async_oauth1_client.py::test_get_via_query 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_add_token_get_request[assert_token_in_header-header] 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_add_token_get_request[assert_token_in_body-body] 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_add_token_get_request[assert_token_in_uri-uri] 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_add_token_to_streaming_request[assert_token_in_header-header] 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_add_token_to_streaming_request[assert_token_in_body-body] 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_add_token_to_streaming_request[assert_token_in_uri-uri] 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_fetch_token_post 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_fetch_token_get 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_token_auth_method_client_secret_post 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_access_token_response_hook 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_password_grant_type 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_client_credentials_type 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_cleans_previous_token_before_fetching_new_one 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_auto_refresh_token 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_auto_refresh_token2 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_auto_refresh_token3 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_auto_refresh_token4 209s FAILED tests/clients/test_httpx/test_async_oauth2_client.py::test_revoke_token 209s FAILED tests/clients/test_starlette/test_oauth_client.py::test_oauth1_authorize 209s FAILED tests/clients/test_starlette/test_oauth_client.py::test_oauth2_authorize 209s FAILED tests/clients/test_starlette/test_oauth_client.py::test_oauth2_authorize_code_challenge 209s FAILED tests/clients/test_starlette/test_oauth_client.py::test_with_fetch_token_in_register 209s FAILED tests/clients/test_starlette/test_oauth_client.py::test_with_fetch_token_in_oauth 209s FAILED tests/clients/test_starlette/test_oauth_client.py::test_request_withhold_token 209s FAILED tests/clients/test_starlette/test_oauth_client.py::test_oauth2_authorize_with_metadata 209s FAILED tests/clients/test_starlette/test_user_mixin.py::test_fetch_userinfo 209s FAILED tests/clients/test_starlette/test_user_mixin.py::test_force_fetch_jwks_uri 209s =========== 35 failed, 132 passed, 2 skipped, 77 warnings in 17.55s ============ 209s autopkgtest [16:59:40]: test unittests3: -----------------------] 210s autopkgtest [16:59:41]: test unittests3: - - - - - - - - - - results - - - - - - - - - - 210s unittests3 FAIL non-zero exit status 1 210s autopkgtest [16:59:41]: @@@@@@@@@@@@@@@@@@@@ summary 210s unittests3 FAIL non-zero exit status 1 214s virt: nova [W] Using flock in prodstack6-ppc64el 214s virt: Creating nova instance adt-plucky-ppc64el-python-authlib-20241109-165611-juju-7f2275-prod-proposed-migration-environment-2-f5e69510-42b1-4144-be6e-91c3285dffdd from image adt/ubuntu-plucky-ppc64el-server-20241108.img (UUID 211c30ab-5e06-4166-a7df-df534accb012)...