0s autopkgtest [02:30:03]: starting date and time: 2025-01-18 02:30:03+0000 0s autopkgtest [02:30:03]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [02:30:03]: host juju-7f2275-prod-proposed-migration-environment-9; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.tnxlv96w/out --timeout-copy=6000 --setup-commands 'ln -s /dev/null /etc/systemd/system/bluetooth.service; printf "http_proxy=http://squid.internal:3128\nhttps_proxy=http://squid.internal:3128\nno_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,radosgw.ps5.canonical.com\n" >> /etc/environment' --apt-pocket=proposed=src:python-urllib3 --apt-upgrade vcr.py --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python-urllib3/2.3.0-1 -- lxd -r lxd-armhf-10.145.243.115 lxd-armhf-10.145.243.115:autopkgtest/ubuntu/plucky/armhf 54s autopkgtest [02:30:57]: testbed dpkg architecture: armhf 56s autopkgtest [02:30:59]: testbed apt version: 2.9.14ubuntu1 61s autopkgtest [02:31:04]: @@@@@@@@@@@@@@@@@@@@ test bed setup 63s autopkgtest [02:31:06]: testbed release detected to be: None 72s autopkgtest [02:31:15]: updating testbed package index (apt update) 74s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 74s Get:2 http://ftpmaster.internal/ubuntu plucky InRelease [213 kB] 75s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 75s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 75s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [9708 B] 75s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.3 kB] 75s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [156 kB] 75s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [838 kB] 75s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf Packages [247 kB] 75s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted armhf Packages [756 B] 75s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf Packages [897 kB] 75s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse armhf Packages [4000 B] 75s Get:13 http://ftpmaster.internal/ubuntu plucky/universe Sources [20.9 MB] 77s Get:14 http://ftpmaster.internal/ubuntu plucky/multiverse Sources [296 kB] 77s Get:15 http://ftpmaster.internal/ubuntu plucky/main Sources [1392 kB] 77s Get:16 http://ftpmaster.internal/ubuntu plucky/restricted Sources [15.2 kB] 77s Get:17 http://ftpmaster.internal/ubuntu plucky/main armhf Packages [1359 kB] 78s Get:18 http://ftpmaster.internal/ubuntu plucky/restricted armhf Packages [2544 B] 78s Get:19 http://ftpmaster.internal/ubuntu plucky/universe armhf Packages [14.6 MB] 78s Get:20 http://ftpmaster.internal/ubuntu plucky/multiverse armhf Packages [173 kB] 82s Fetched 41.2 MB in 7s (5710 kB/s) 83s Reading package lists... 89s autopkgtest [02:31:32]: upgrading testbed (apt dist-upgrade and autopurge) 91s Reading package lists... 92s Building dependency tree... 92s Reading state information... 92s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 93s Starting 2 pkgProblemResolver with broken count: 0 93s Done 94s Entering ResolveByKeep 94s 95s The following packages were automatically installed and are no longer required: 95s libassuan0 libicu74 95s Use 'apt autoremove' to remove them. 95s The following NEW packages will be installed: 95s libicu76 openssl-provider-legacy python3-bcrypt 95s The following packages will be upgraded: 95s apport apport-core-dump-handler appstream apt apt-utils base-passwd bash 95s bash-completion binutils binutils-arm-linux-gnueabihf binutils-common 95s bsdextrautils bsdutils cloud-init cloud-init-base console-setup 95s console-setup-linux curl dirmngr dpkg dpkg-dev dracut-install eject ethtool 95s fdisk fwupd gcc-14-base gettext-base gir1.2-girepository-2.0 gir1.2-glib-2.0 95s gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpgconf gpgsm gpgv 95s groff-base iputils-ping iputils-tracepath keyboard-configuration keyboxd 95s libappstream5 libapt-pkg6.0t64 libatomic1 libbinutils libblkid1 libbpf1 95s libc-bin libc6 libcap-ng0 libctf-nobfd0 libctf0 libcurl3t64-gnutls 95s libcurl4t64 libdebconfclient0 libdpkg-perl libfdisk1 libfribidi0 libftdi1-2 95s libfwupd3 libgcc-s1 libgirepository-1.0-1 libglib2.0-0t64 libglib2.0-bin 95s libglib2.0-data libgpg-error-l10n libgpg-error0 libgpgme11t64 95s libgstreamer1.0-0 libgudev-1.0-0 libjson-glib-1.0-0 libjson-glib-1.0-common 95s libmount1 libnewt0.52 libnpth0t64 libnss-systemd libnss3 libpam-systemd 95s libpng16-16t64 libpython3-stdlib libpython3.12-minimal libpython3.12-stdlib 95s libqmi-glib5 libqmi-proxy libreadline8t64 libsframe1 libsmartcols1 95s libssl3t64 libstdc++6 libsystemd-shared libsystemd0 libtraceevent1 95s libtraceevent1-plugin libudev1 libunistring5 libuuid1 libwrap0 libxkbcommon0 95s libxml2 libyaml-0-2 locales make mount nano openssl pci.ids publicsuffix 95s python-apt-common python3 python3-apport python3-apt python3-attr 95s python3-certifi python3-chardet python3-cryptography python3-gdbm 95s python3-jinja2 python3-json-pointer python3-jsonpatch python3-jwt 95s python3-minimal python3-newt python3-oauthlib python3-openssl 95s python3-pkg-resources python3-problem-report python3-rich python3-setuptools 95s python3-software-properties python3-urllib3 python3-wadllib python3.12 95s python3.12-gdbm python3.12-minimal python3.13-gdbm readline-common rsync 95s software-properties-common systemd systemd-cryptsetup systemd-resolved 95s systemd-sysv systemd-timesyncd tar tzdata ucf udev usb.ids util-linux 95s uuid-runtime whiptail xauth xfsprogs 95s 156 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. 95s Need to get 76.2 MB of archives. 95s After this operation, 46.2 MB of additional disk space will be used. 95s Get:1 http://ftpmaster.internal/ubuntu plucky/main armhf bash armhf 5.2.37-1ubuntu1 [677 kB] 95s Get:2 http://ftpmaster.internal/ubuntu plucky/main armhf bsdutils armhf 1:2.40.2-1ubuntu2 [108 kB] 95s Get:3 http://ftpmaster.internal/ubuntu plucky/main armhf libatomic1 armhf 14.2.0-13ubuntu1 [7890 B] 95s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-14-base armhf 14.2.0-13ubuntu1 [53.0 kB] 95s Get:5 http://ftpmaster.internal/ubuntu plucky/main armhf libgcc-s1 armhf 14.2.0-13ubuntu1 [40.6 kB] 95s Get:6 http://ftpmaster.internal/ubuntu plucky/main armhf libstdc++6 armhf 14.2.0-13ubuntu1 [711 kB] 95s Get:7 http://ftpmaster.internal/ubuntu plucky/main armhf libc6 armhf 2.40-4ubuntu1 [2866 kB] 96s Get:8 http://ftpmaster.internal/ubuntu plucky/main armhf openssl-provider-legacy armhf 3.4.0-1ubuntu2 [29.4 kB] 96s Get:9 http://ftpmaster.internal/ubuntu plucky/main armhf libssl3t64 armhf 3.4.0-1ubuntu2 [1756 kB] 96s Get:10 http://ftpmaster.internal/ubuntu plucky/main armhf systemd-timesyncd armhf 257-2ubuntu1 [41.2 kB] 96s Get:11 http://ftpmaster.internal/ubuntu plucky/main armhf systemd-resolved armhf 257-2ubuntu1 [307 kB] 96s Get:12 http://ftpmaster.internal/ubuntu plucky/main armhf systemd-cryptsetup armhf 257-2ubuntu1 [122 kB] 96s Get:13 http://ftpmaster.internal/ubuntu plucky/main armhf bsdextrautils armhf 2.40.2-1ubuntu2 [99.4 kB] 96s Get:14 http://ftpmaster.internal/ubuntu plucky/main armhf eject armhf 2.40.2-1ubuntu2 [62.3 kB] 96s Get:15 http://ftpmaster.internal/ubuntu plucky/main armhf fdisk armhf 2.40.2-1ubuntu2 [155 kB] 96s Get:16 http://ftpmaster.internal/ubuntu plucky/main armhf libblkid1 armhf 2.40.2-1ubuntu2 [167 kB] 96s Get:17 http://ftpmaster.internal/ubuntu plucky/main armhf libmount1 armhf 2.40.2-1ubuntu2 [189 kB] 96s Get:18 http://ftpmaster.internal/ubuntu plucky/main armhf libsmartcols1 armhf 2.40.2-1ubuntu2 [135 kB] 96s Get:19 http://ftpmaster.internal/ubuntu plucky/main armhf libuuid1 armhf 2.40.2-1ubuntu2 [39.5 kB] 96s Get:20 http://ftpmaster.internal/ubuntu plucky/main armhf util-linux armhf 2.40.2-1ubuntu2 [1195 kB] 96s Get:21 http://ftpmaster.internal/ubuntu plucky/main armhf uuid-runtime armhf 2.40.2-1ubuntu2 [62.7 kB] 96s Get:22 http://ftpmaster.internal/ubuntu plucky/main armhf libfdisk1 armhf 2.40.2-1ubuntu2 [211 kB] 96s Get:23 http://ftpmaster.internal/ubuntu plucky/main armhf mount armhf 2.40.2-1ubuntu2 [156 kB] 96s Get:24 http://ftpmaster.internal/ubuntu plucky/main armhf readline-common all 8.2-6 [56.5 kB] 96s Get:25 http://ftpmaster.internal/ubuntu plucky/main armhf libreadline8t64 armhf 8.2-6 [131 kB] 96s Get:26 http://ftpmaster.internal/ubuntu plucky/main armhf libnss-systemd armhf 257-2ubuntu1 [160 kB] 96s Get:27 http://ftpmaster.internal/ubuntu plucky/main armhf systemd armhf 257-2ubuntu1 [3489 kB] 96s Get:28 http://ftpmaster.internal/ubuntu plucky/main armhf udev armhf 257-2ubuntu1 [1974 kB] 96s Get:29 http://ftpmaster.internal/ubuntu plucky/main armhf systemd-sysv armhf 257-2ubuntu1 [11.8 kB] 96s Get:30 http://ftpmaster.internal/ubuntu plucky/main armhf libpam-systemd armhf 257-2ubuntu1 [233 kB] 96s Get:31 http://ftpmaster.internal/ubuntu plucky/main armhf libsystemd-shared armhf 257-2ubuntu1 [2156 kB] 96s Get:32 http://ftpmaster.internal/ubuntu plucky/main armhf libudev1 armhf 257-2ubuntu1 [190 kB] 96s Get:33 http://ftpmaster.internal/ubuntu plucky/main armhf libsystemd0 armhf 257-2ubuntu1 [483 kB] 96s Get:34 http://ftpmaster.internal/ubuntu plucky/main armhf libapt-pkg6.0t64 armhf 2.9.18 [1085 kB] 96s Get:35 http://ftpmaster.internal/ubuntu plucky/main armhf tar armhf 1.35+dfsg-3.1 [240 kB] 96s Get:36 http://ftpmaster.internal/ubuntu plucky/main armhf dpkg armhf 1.22.11ubuntu4 [1242 kB] 96s Get:37 http://ftpmaster.internal/ubuntu plucky/main armhf libdebconfclient0 armhf 0.274ubuntu1 [11.2 kB] 96s Get:38 http://ftpmaster.internal/ubuntu plucky/main armhf base-passwd armhf 3.6.6 [53.4 kB] 96s Get:39 http://ftpmaster.internal/ubuntu plucky/main armhf libc-bin armhf 2.40-4ubuntu1 [542 kB] 96s Get:40 http://ftpmaster.internal/ubuntu plucky/main armhf apt armhf 2.9.18 [1349 kB] 96s Get:41 http://ftpmaster.internal/ubuntu plucky/main armhf apt-utils armhf 2.9.18 [216 kB] 96s Get:42 http://ftpmaster.internal/ubuntu plucky/main armhf libgpg-error-l10n all 1.51-3 [8800 B] 96s Get:43 http://ftpmaster.internal/ubuntu plucky/main armhf libgpg-error0 armhf 1.51-3 [64.8 kB] 96s Get:44 http://ftpmaster.internal/ubuntu plucky/main armhf libnpth0t64 armhf 1.8-2 [7572 B] 96s Get:45 http://ftpmaster.internal/ubuntu plucky/main armhf gpg-wks-client armhf 2.4.4-2ubuntu21 [88.9 kB] 96s Get:46 http://ftpmaster.internal/ubuntu plucky/main armhf dirmngr armhf 2.4.4-2ubuntu21 [351 kB] 96s Get:47 http://ftpmaster.internal/ubuntu plucky/main armhf gpgsm armhf 2.4.4-2ubuntu21 [246 kB] 96s Get:48 http://ftpmaster.internal/ubuntu plucky/main armhf gnupg-utils armhf 2.4.4-2ubuntu21 [160 kB] 96s Get:49 http://ftpmaster.internal/ubuntu plucky/main armhf gpg-agent armhf 2.4.4-2ubuntu21 [238 kB] 96s Get:50 http://ftpmaster.internal/ubuntu plucky/main armhf gpg armhf 2.4.4-2ubuntu21 [536 kB] 96s Get:51 http://ftpmaster.internal/ubuntu plucky/main armhf gpgconf armhf 2.4.4-2ubuntu21 [118 kB] 96s Get:52 http://ftpmaster.internal/ubuntu plucky/main armhf gnupg all 2.4.4-2ubuntu21 [359 kB] 96s Get:53 http://ftpmaster.internal/ubuntu plucky/main armhf keyboxd armhf 2.4.4-2ubuntu21 [113 kB] 96s Get:54 http://ftpmaster.internal/ubuntu plucky/main armhf gpgv armhf 2.4.4-2ubuntu21 [228 kB] 96s Get:55 http://ftpmaster.internal/ubuntu plucky/main armhf console-setup-linux all 1.226ubuntu3 [1880 kB] 96s Get:56 http://ftpmaster.internal/ubuntu plucky/main armhf console-setup all 1.226ubuntu3 [110 kB] 96s Get:57 http://ftpmaster.internal/ubuntu plucky/main armhf keyboard-configuration all 1.226ubuntu3 [212 kB] 96s Get:58 http://ftpmaster.internal/ubuntu plucky/main armhf python3-minimal armhf 3.12.8-1 [27.5 kB] 96s Get:59 http://ftpmaster.internal/ubuntu plucky/main armhf python3 armhf 3.12.8-1 [23.9 kB] 96s Get:60 http://ftpmaster.internal/ubuntu plucky/main armhf tzdata all 2024b-4ubuntu1 [196 kB] 96s Get:61 http://ftpmaster.internal/ubuntu plucky/main armhf python3.12 armhf 3.12.8-3 [667 kB] 96s Get:62 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3.12-stdlib armhf 3.12.8-3 [1939 kB] 96s Get:63 http://ftpmaster.internal/ubuntu plucky/main armhf python3.12-minimal armhf 3.12.8-3 [2029 kB] 96s Get:64 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3.12-minimal armhf 3.12.8-3 [825 kB] 96s Get:65 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3-stdlib armhf 3.12.8-1 [10.1 kB] 96s Get:66 http://ftpmaster.internal/ubuntu plucky/main armhf rsync armhf 3.3.0+ds1-2 [422 kB] 96s Get:67 http://ftpmaster.internal/ubuntu plucky/main armhf python-apt-common all 2.9.6build1 [21.0 kB] 96s Get:68 http://ftpmaster.internal/ubuntu plucky/main armhf python3-apt armhf 2.9.6build1 [174 kB] 96s Get:69 http://ftpmaster.internal/ubuntu plucky/main armhf python3-problem-report all 2.31.0-0ubuntu2 [25.3 kB] 96s Get:70 http://ftpmaster.internal/ubuntu plucky/main armhf python3-apport all 2.31.0-0ubuntu2 [93.1 kB] 96s Get:71 http://ftpmaster.internal/ubuntu plucky/main armhf libglib2.0-data all 2.82.4-1 [52.2 kB] 97s Get:72 http://ftpmaster.internal/ubuntu plucky/main armhf libglib2.0-bin armhf 2.82.4-1 [93.0 kB] 97s Get:73 http://ftpmaster.internal/ubuntu plucky/main armhf gir1.2-girepository-2.0 armhf 1.82.0-3 [25.3 kB] 97s Get:74 http://ftpmaster.internal/ubuntu plucky/main armhf gir1.2-glib-2.0 armhf 2.82.4-1 [182 kB] 97s Get:75 http://ftpmaster.internal/ubuntu plucky/main armhf libglib2.0-0t64 armhf 2.82.4-1 [1421 kB] 97s Get:76 http://ftpmaster.internal/ubuntu plucky/main armhf libgirepository-1.0-1 armhf 1.82.0-3 [108 kB] 97s Get:77 http://ftpmaster.internal/ubuntu plucky/main armhf apport-core-dump-handler all 2.31.0-0ubuntu2 [18.2 kB] 97s Get:78 http://ftpmaster.internal/ubuntu plucky/main armhf apport all 2.31.0-0ubuntu2 [82.9 kB] 97s Get:79 http://ftpmaster.internal/ubuntu plucky/main armhf libcap-ng0 armhf 0.8.5-4 [13.8 kB] 97s Get:80 http://ftpmaster.internal/ubuntu plucky/main armhf libunistring5 armhf 1.3-1 [583 kB] 97s Get:81 http://ftpmaster.internal/ubuntu plucky/main armhf iputils-ping armhf 3:20240905-1ubuntu1 [45.0 kB] 97s Get:82 http://ftpmaster.internal/ubuntu plucky/main armhf libbpf1 armhf 1:1.5.0-2 [158 kB] 97s Get:83 http://ftpmaster.internal/ubuntu plucky/main armhf libfribidi0 armhf 1.0.16-1 [24.3 kB] 97s Get:84 http://ftpmaster.internal/ubuntu plucky/main armhf python3-newt armhf 0.52.24-4ubuntu1 [20.1 kB] 97s Get:85 http://ftpmaster.internal/ubuntu plucky/main armhf libnewt0.52 armhf 0.52.24-4ubuntu1 [39.7 kB] 97s Get:86 http://ftpmaster.internal/ubuntu plucky/main armhf libxml2 armhf 2.12.7+dfsg+really2.9.14-0.2ubuntu2 [598 kB] 97s Get:87 http://ftpmaster.internal/ubuntu plucky/main armhf libyaml-0-2 armhf 0.2.5-2 [45.3 kB] 97s Get:88 http://ftpmaster.internal/ubuntu plucky/main armhf locales all 2.40-4ubuntu1 [4224 kB] 97s Get:89 http://ftpmaster.internal/ubuntu plucky/main armhf openssl armhf 3.4.0-1ubuntu2 [1159 kB] 97s Get:90 http://ftpmaster.internal/ubuntu plucky/main armhf python3-rich all 13.9.4-1 [190 kB] 97s Get:91 http://ftpmaster.internal/ubuntu plucky/main armhf ucf all 3.0046 [41.9 kB] 97s Get:92 http://ftpmaster.internal/ubuntu plucky/main armhf whiptail armhf 0.52.24-4ubuntu1 [17.3 kB] 97s Get:93 http://ftpmaster.internal/ubuntu plucky/main armhf bash-completion all 1:2.16.0-3 [214 kB] 97s Get:94 http://ftpmaster.internal/ubuntu plucky/main armhf ethtool armhf 1:6.11-1 [222 kB] 97s Get:95 http://ftpmaster.internal/ubuntu plucky/main armhf gettext-base armhf 0.22.5-3 [40.7 kB] 97s Get:96 http://ftpmaster.internal/ubuntu plucky/main armhf groff-base armhf 1.23.0-7 [949 kB] 97s Get:97 http://ftpmaster.internal/ubuntu plucky/main armhf iputils-tracepath armhf 3:20240905-1ubuntu1 [13.3 kB] 97s Get:98 http://ftpmaster.internal/ubuntu plucky/main armhf libpng16-16t64 armhf 1.6.44-3 [169 kB] 97s Get:99 http://ftpmaster.internal/ubuntu plucky/main armhf libtraceevent1-plugin armhf 1:1.8.4-2 [19.0 kB] 97s Get:100 http://ftpmaster.internal/ubuntu plucky/main armhf libtraceevent1 armhf 1:1.8.4-2 [53.8 kB] 97s Get:101 http://ftpmaster.internal/ubuntu plucky/main armhf libxkbcommon0 armhf 1.7.0-2 [113 kB] 97s Get:102 http://ftpmaster.internal/ubuntu plucky/main armhf nano armhf 8.3-1 [277 kB] 97s Get:103 http://ftpmaster.internal/ubuntu plucky/main armhf pci.ids all 0.0~2024.11.25-1 [282 kB] 97s Get:104 http://ftpmaster.internal/ubuntu plucky/main armhf publicsuffix all 20241206.1516-0.1 [135 kB] 97s Get:105 http://ftpmaster.internal/ubuntu plucky/main armhf python3.13-gdbm armhf 3.13.1-2 [29.8 kB] 97s Get:106 http://ftpmaster.internal/ubuntu plucky/main armhf python3.12-gdbm armhf 3.12.8-3 [28.9 kB] 97s Get:107 http://ftpmaster.internal/ubuntu plucky/main armhf python3-gdbm armhf 3.13.1-1 [8668 B] 97s Get:108 http://ftpmaster.internal/ubuntu plucky/main armhf usb.ids all 2025.01.14-1 [223 kB] 97s Get:109 http://ftpmaster.internal/ubuntu plucky/main armhf xauth armhf 1:1.1.2-1.1 [23.0 kB] 97s Get:110 http://ftpmaster.internal/ubuntu plucky/main armhf libcurl3t64-gnutls armhf 8.11.1-1ubuntu1 [333 kB] 98s Get:111 http://ftpmaster.internal/ubuntu plucky/main armhf libappstream5 armhf 1.0.4-1 [211 kB] 98s Get:112 http://ftpmaster.internal/ubuntu plucky/main armhf appstream armhf 1.0.4-1 [67.3 kB] 98s Get:113 http://ftpmaster.internal/ubuntu plucky/main armhf libctf0 armhf 2.43.50.20241230-1ubuntu1 [74.5 kB] 98s Get:114 http://ftpmaster.internal/ubuntu plucky/main armhf libctf-nobfd0 armhf 2.43.50.20241230-1ubuntu1 [77.3 kB] 98s Get:115 http://ftpmaster.internal/ubuntu plucky/main armhf binutils-arm-linux-gnueabihf armhf 2.43.50.20241230-1ubuntu1 [2960 kB] 98s Get:116 http://ftpmaster.internal/ubuntu plucky/main armhf libbinutils armhf 2.43.50.20241230-1ubuntu1 [403 kB] 98s Get:117 http://ftpmaster.internal/ubuntu plucky/main armhf binutils armhf 2.43.50.20241230-1ubuntu1 [3086 B] 98s Get:118 http://ftpmaster.internal/ubuntu plucky/main armhf binutils-common armhf 2.43.50.20241230-1ubuntu1 [222 kB] 98s Get:119 http://ftpmaster.internal/ubuntu plucky/main armhf libsframe1 armhf 2.43.50.20241230-1ubuntu1 [12.1 kB] 98s Get:120 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jinja2 all 3.1.3-1.1 [108 kB] 98s Get:121 http://ftpmaster.internal/ubuntu plucky/main armhf python3-json-pointer all 2.4-3 [8444 B] 98s Get:122 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jsonpatch all 1.32-5 [12.3 kB] 98s Get:123 http://ftpmaster.internal/ubuntu plucky/main armhf python3-bcrypt armhf 4.2.0-2.1 [239 kB] 98s Get:124 http://ftpmaster.internal/ubuntu plucky/main armhf python3-cryptography armhf 43.0.0-1 [925 kB] 98s Get:125 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jwt all 2.10.1-2 [21.0 kB] 98s Get:126 http://ftpmaster.internal/ubuntu plucky/main armhf python3-oauthlib all 3.2.2-3 [89.9 kB] 98s Get:127 http://ftpmaster.internal/ubuntu plucky/main armhf cloud-init-base all 25.1~2g4ee65391-0ubuntu1 [614 kB] 98s Get:128 http://ftpmaster.internal/ubuntu plucky/main armhf curl armhf 8.11.1-1ubuntu1 [244 kB] 98s Get:129 http://ftpmaster.internal/ubuntu plucky/main armhf libcurl4t64 armhf 8.11.1-1ubuntu1 [337 kB] 98s Get:130 http://ftpmaster.internal/ubuntu plucky/main armhf dpkg-dev all 1.22.11ubuntu4 [1088 kB] 98s Get:131 http://ftpmaster.internal/ubuntu plucky/main armhf libdpkg-perl all 1.22.11ubuntu4 [279 kB] 98s Get:132 http://ftpmaster.internal/ubuntu plucky/main armhf make armhf 4.4.1-1 [180 kB] 98s Get:133 http://ftpmaster.internal/ubuntu plucky/main armhf dracut-install armhf 105-2ubuntu5 [37.3 kB] 98s Get:134 http://ftpmaster.internal/ubuntu plucky/main armhf libjson-glib-1.0-common all 1.10.6+ds-1 [5636 B] 98s Get:135 http://ftpmaster.internal/ubuntu plucky/main armhf libjson-glib-1.0-0 armhf 1.10.6+ds-1 [59.5 kB] 98s Get:136 http://ftpmaster.internal/ubuntu plucky/main armhf fwupd armhf 2.0.3-3 [5028 kB] 98s Get:137 http://ftpmaster.internal/ubuntu plucky/main armhf libfwupd3 armhf 2.0.3-3 [121 kB] 98s Get:138 http://ftpmaster.internal/ubuntu plucky/main armhf libqmi-proxy armhf 1.35.6-1 [5878 B] 98s Get:139 http://ftpmaster.internal/ubuntu plucky/main armhf libqmi-glib5 armhf 1.35.6-1 [928 kB] 98s Get:140 http://ftpmaster.internal/ubuntu plucky/main armhf gnupg-l10n all 2.4.4-2ubuntu21 [66.3 kB] 98s Get:141 http://ftpmaster.internal/ubuntu plucky/main armhf libftdi1-2 armhf 1.5-8 [26.3 kB] 98s Get:142 http://ftpmaster.internal/ubuntu plucky/main armhf libgpgme11t64 armhf 1.24.1-2ubuntu1 [126 kB] 98s Get:143 http://ftpmaster.internal/ubuntu plucky/main armhf libgstreamer1.0-0 armhf 1.24.10-2 [1109 kB] 98s Get:144 http://ftpmaster.internal/ubuntu plucky/main armhf libgudev-1.0-0 armhf 1:238-6 [13.7 kB] 98s Get:145 http://ftpmaster.internal/ubuntu plucky/main armhf libicu76 armhf 76.1-1ubuntu2 [10.8 MB] 99s Get:146 http://ftpmaster.internal/ubuntu plucky/main armhf libnss3 armhf 2:3.106-1ubuntu1 [1321 kB] 99s Get:147 http://ftpmaster.internal/ubuntu plucky/main armhf libwrap0 armhf 7.6.q-34 [45.7 kB] 99s Get:148 http://ftpmaster.internal/ubuntu plucky/main armhf python3-attr all 24.2.0-1 [50.2 kB] 99s Get:149 http://ftpmaster.internal/ubuntu plucky/main armhf python3-certifi all 2024.12.14+ds-1 [9800 B] 99s Get:150 http://ftpmaster.internal/ubuntu plucky/main armhf python3-chardet all 5.2.0+dfsg-2 [116 kB] 99s Get:151 http://ftpmaster.internal/ubuntu plucky/main armhf python3-openssl all 24.3.0-1 [45.8 kB] 99s Get:152 http://ftpmaster.internal/ubuntu plucky/main armhf python3-pkg-resources all 75.6.0-1 [144 kB] 99s Get:153 http://ftpmaster.internal/ubuntu plucky/main armhf python3-setuptools all 75.6.0-1 [645 kB] 99s Get:154 http://ftpmaster.internal/ubuntu plucky/main armhf software-properties-common all 0.108 [16.5 kB] 99s Get:155 http://ftpmaster.internal/ubuntu plucky/main armhf python3-software-properties all 0.108 [30.9 kB] 99s Get:156 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf python3-urllib3 all 2.3.0-1 [94.0 kB] 99s Get:157 http://ftpmaster.internal/ubuntu plucky/main armhf python3-wadllib all 2.0.0-2 [36.2 kB] 99s Get:158 http://ftpmaster.internal/ubuntu plucky/main armhf xfsprogs armhf 6.8.0-2.2ubuntu3 [893 kB] 99s Get:159 http://ftpmaster.internal/ubuntu plucky/main armhf cloud-init all 25.1~2g4ee65391-0ubuntu1 [2104 B] 100s Preconfiguring packages ... 101s Fetched 76.2 MB in 4s (19.0 MB/s) 101s (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 ... 59970 files and directories currently installed.) 101s Preparing to unpack .../bash_5.2.37-1ubuntu1_armhf.deb ... 101s Unpacking bash (5.2.37-1ubuntu1) over (5.2.32-1ubuntu2) ... 101s Setting up bash (5.2.37-1ubuntu1) ... 101s update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode 101s (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 ... 59970 files and directories currently installed.) 101s Preparing to unpack .../bsdutils_1%3a2.40.2-1ubuntu2_armhf.deb ... 101s Unpacking bsdutils (1:2.40.2-1ubuntu2) over (1:2.40.2-1ubuntu1) ... 101s Setting up bsdutils (1:2.40.2-1ubuntu2) ... 101s (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 ... 59970 files and directories currently installed.) 101s Preparing to unpack .../libatomic1_14.2.0-13ubuntu1_armhf.deb ... 101s Unpacking libatomic1:armhf (14.2.0-13ubuntu1) over (14.2.0-8ubuntu1) ... 101s Preparing to unpack .../gcc-14-base_14.2.0-13ubuntu1_armhf.deb ... 101s Unpacking gcc-14-base:armhf (14.2.0-13ubuntu1) over (14.2.0-8ubuntu1) ... 101s Setting up gcc-14-base:armhf (14.2.0-13ubuntu1) ... 101s (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 ... 59970 files and directories currently installed.) 101s Preparing to unpack .../libgcc-s1_14.2.0-13ubuntu1_armhf.deb ... 101s Unpacking libgcc-s1:armhf (14.2.0-13ubuntu1) over (14.2.0-8ubuntu1) ... 101s Setting up libgcc-s1:armhf (14.2.0-13ubuntu1) ... 101s (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 ... 59970 files and directories currently installed.) 101s Preparing to unpack .../libstdc++6_14.2.0-13ubuntu1_armhf.deb ... 101s Unpacking libstdc++6:armhf (14.2.0-13ubuntu1) over (14.2.0-8ubuntu1) ... 101s Setting up libstdc++6:armhf (14.2.0-13ubuntu1) ... 102s (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 ... 59970 files and directories currently installed.) 102s Preparing to unpack .../libc6_2.40-4ubuntu1_armhf.deb ... 102s Unpacking libc6:armhf (2.40-4ubuntu1) over (2.40-1ubuntu3) ... 102s Setting up libc6:armhf (2.40-4ubuntu1) ... 102s (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 ... 59970 files and directories currently installed.) 102s Preparing to unpack .../libssl3t64_3.4.0-1ubuntu2_armhf.deb ... 102s Unpacking libssl3t64:armhf (3.4.0-1ubuntu2) over (3.3.1-2ubuntu2) ... 102s Selecting previously unselected package openssl-provider-legacy. 102s Preparing to unpack .../openssl-provider-legacy_3.4.0-1ubuntu2_armhf.deb ... 102s Unpacking openssl-provider-legacy (3.4.0-1ubuntu2) ... 103s Setting up libssl3t64:armhf (3.4.0-1ubuntu2) ... 103s Setting up openssl-provider-legacy (3.4.0-1ubuntu2) ... 103s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 59973 files and directories currently installed.) 103s Preparing to unpack .../0-systemd-timesyncd_257-2ubuntu1_armhf.deb ... 103s Unpacking systemd-timesyncd (257-2ubuntu1) over (256.5-2ubuntu4) ... 103s Preparing to unpack .../1-systemd-resolved_257-2ubuntu1_armhf.deb ... 103s Unpacking systemd-resolved (257-2ubuntu1) over (256.5-2ubuntu4) ... 103s Preparing to unpack .../2-systemd-cryptsetup_257-2ubuntu1_armhf.deb ... 103s Unpacking systemd-cryptsetup (257-2ubuntu1) over (256.5-2ubuntu4) ... 103s Preparing to unpack .../3-bsdextrautils_2.40.2-1ubuntu2_armhf.deb ... 103s Unpacking bsdextrautils (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 103s Preparing to unpack .../4-eject_2.40.2-1ubuntu2_armhf.deb ... 103s Unpacking eject (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 103s Preparing to unpack .../5-fdisk_2.40.2-1ubuntu2_armhf.deb ... 103s Unpacking fdisk (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 103s Preparing to unpack .../6-libblkid1_2.40.2-1ubuntu2_armhf.deb ... 103s Unpacking libblkid1:armhf (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 103s Setting up libblkid1:armhf (2.40.2-1ubuntu2) ... 103s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 59974 files and directories currently installed.) 103s Preparing to unpack .../libmount1_2.40.2-1ubuntu2_armhf.deb ... 103s Unpacking libmount1:armhf (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 103s Setting up libmount1:armhf (2.40.2-1ubuntu2) ... 103s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 59974 files and directories currently installed.) 103s Preparing to unpack .../libsmartcols1_2.40.2-1ubuntu2_armhf.deb ... 103s Unpacking libsmartcols1:armhf (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 103s Setting up libsmartcols1:armhf (2.40.2-1ubuntu2) ... 103s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 59974 files and directories currently installed.) 103s Preparing to unpack .../libuuid1_2.40.2-1ubuntu2_armhf.deb ... 103s Unpacking libuuid1:armhf (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 104s Setting up libuuid1:armhf (2.40.2-1ubuntu2) ... 104s (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 ... 59974 files and directories currently installed.) 104s Preparing to unpack .../util-linux_2.40.2-1ubuntu2_armhf.deb ... 104s Unpacking util-linux (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 104s Setting up util-linux (2.40.2-1ubuntu2) ... 105s fstrim.service is a disabled or a static unit not running, not starting it. 105s (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 ... 59974 files and directories currently installed.) 105s Preparing to unpack .../0-uuid-runtime_2.40.2-1ubuntu2_armhf.deb ... 105s Unpacking uuid-runtime (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 105s Preparing to unpack .../1-libfdisk1_2.40.2-1ubuntu2_armhf.deb ... 105s Unpacking libfdisk1:armhf (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 105s Preparing to unpack .../2-mount_2.40.2-1ubuntu2_armhf.deb ... 105s Unpacking mount (2.40.2-1ubuntu2) over (2.40.2-1ubuntu1) ... 105s Preparing to unpack .../3-readline-common_8.2-6_all.deb ... 105s Unpacking readline-common (8.2-6) over (8.2-5) ... 105s Preparing to unpack .../4-libreadline8t64_8.2-6_armhf.deb ... 105s Leaving 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8 to /lib/arm-linux-gnueabihf/libhistory.so.8.usr-is-merged by libreadline8t64' 105s Leaving 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8.2 to /lib/arm-linux-gnueabihf/libhistory.so.8.2.usr-is-merged by libreadline8t64' 105s Leaving 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8 to /lib/arm-linux-gnueabihf/libreadline.so.8.usr-is-merged by libreadline8t64' 105s Leaving 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8.2 to /lib/arm-linux-gnueabihf/libreadline.so.8.2.usr-is-merged by libreadline8t64' 105s Unpacking libreadline8t64:armhf (8.2-6) over (8.2-5) ... 105s Preparing to unpack .../5-libnss-systemd_257-2ubuntu1_armhf.deb ... 105s Unpacking libnss-systemd:armhf (257-2ubuntu1) over (256.5-2ubuntu4) ... 105s Preparing to unpack .../6-systemd_257-2ubuntu1_armhf.deb ... 105s Unpacking systemd (257-2ubuntu1) over (256.5-2ubuntu4) ... 106s Preparing to unpack .../7-udev_257-2ubuntu1_armhf.deb ... 106s Unpacking udev (257-2ubuntu1) over (256.5-2ubuntu4) ... 106s Preparing to unpack .../8-libsystemd-shared_257-2ubuntu1_armhf.deb ... 106s Unpacking libsystemd-shared:armhf (257-2ubuntu1) over (256.5-2ubuntu4) ... 106s Setting up libsystemd-shared:armhf (257-2ubuntu1) ... 106s (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 ... 59967 files and directories currently installed.) 106s Preparing to unpack .../libsystemd0_257-2ubuntu1_armhf.deb ... 106s Unpacking libsystemd0:armhf (257-2ubuntu1) over (256.5-2ubuntu4) ... 106s Setting up libsystemd0:armhf (257-2ubuntu1) ... 106s Setting up mount (2.40.2-1ubuntu2) ... 106s Setting up systemd (257-2ubuntu1) ... 106s Installing new version of config file /etc/systemd/logind.conf ... 106s Installing new version of config file /etc/systemd/sleep.conf ... 106s /usr/lib/tmpfiles.d/legacy.conf:14: Duplicate line for path "/run/lock", ignoring. 106s Created symlink '/run/systemd/system/tmp.mount' → '/dev/null'. 107s /usr/lib/tmpfiles.d/legacy.conf:14: Duplicate line for path "/run/lock", ignoring. 107s (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 ... 59967 files and directories currently installed.) 107s Preparing to unpack .../systemd-sysv_257-2ubuntu1_armhf.deb ... 107s Unpacking systemd-sysv (257-2ubuntu1) over (256.5-2ubuntu4) ... 107s Preparing to unpack .../libpam-systemd_257-2ubuntu1_armhf.deb ... 107s Unpacking libpam-systemd:armhf (257-2ubuntu1) over (256.5-2ubuntu4) ... 107s Preparing to unpack .../libudev1_257-2ubuntu1_armhf.deb ... 107s Unpacking libudev1:armhf (257-2ubuntu1) over (256.5-2ubuntu4) ... 108s Setting up libudev1:armhf (257-2ubuntu1) ... 108s (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 ... 59967 files and directories currently installed.) 108s Preparing to unpack .../libapt-pkg6.0t64_2.9.18_armhf.deb ... 108s Unpacking libapt-pkg6.0t64:armhf (2.9.18) over (2.9.14ubuntu1) ... 108s Setting up libapt-pkg6.0t64:armhf (2.9.18) ... 108s (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 ... 59967 files and directories currently installed.) 108s Preparing to unpack .../tar_1.35+dfsg-3.1_armhf.deb ... 108s Unpacking tar (1.35+dfsg-3.1) over (1.35+dfsg-3build1) ... 108s Setting up tar (1.35+dfsg-3.1) ... 108s (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 ... 59967 files and directories currently installed.) 108s Preparing to unpack .../dpkg_1.22.11ubuntu4_armhf.deb ... 108s Unpacking dpkg (1.22.11ubuntu4) over (1.22.11ubuntu3) ... 108s Setting up dpkg (1.22.11ubuntu4) ... 109s (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 ... 59967 files and directories currently installed.) 109s Preparing to unpack .../libdebconfclient0_0.274ubuntu1_armhf.deb ... 109s Unpacking libdebconfclient0:armhf (0.274ubuntu1) over (0.272ubuntu1) ... 109s Setting up libdebconfclient0:armhf (0.274ubuntu1) ... 109s (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 ... 59967 files and directories currently installed.) 109s Preparing to unpack .../base-passwd_3.6.6_armhf.deb ... 109s Unpacking base-passwd (3.6.6) over (3.6.5) ... 109s Setting up base-passwd (3.6.6) ... 109s (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 ... 59967 files and directories currently installed.) 109s Preparing to unpack .../libc-bin_2.40-4ubuntu1_armhf.deb ... 109s Unpacking libc-bin (2.40-4ubuntu1) over (2.40-1ubuntu3) ... 109s Setting up libc-bin (2.40-4ubuntu1) ... 109s (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 ... 59967 files and directories currently installed.) 109s Preparing to unpack .../archives/apt_2.9.18_armhf.deb ... 109s Unpacking apt (2.9.18) over (2.9.14ubuntu1) ... 110s Setting up apt (2.9.18) ... 110s (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 ... 59966 files and directories currently installed.) 110s Preparing to unpack .../apt-utils_2.9.18_armhf.deb ... 110s Unpacking apt-utils (2.9.18) over (2.9.14ubuntu1) ... 111s Preparing to unpack .../libgpg-error-l10n_1.51-3_all.deb ... 111s Unpacking libgpg-error-l10n (1.51-3) over (1.50-4) ... 111s Preparing to unpack .../libgpg-error0_1.51-3_armhf.deb ... 111s Unpacking libgpg-error0:armhf (1.51-3) over (1.50-4) ... 111s Setting up libgpg-error0:armhf (1.51-3) ... 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 ... 59966 files and directories currently installed.) 111s Preparing to unpack .../libnpth0t64_1.8-2_armhf.deb ... 111s Unpacking libnpth0t64:armhf (1.8-2) over (1.6-3.1build1) ... 111s Setting up libnpth0t64:armhf (1.8-2) ... 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 ... 59966 files and directories currently installed.) 111s Preparing to unpack .../0-gpg-wks-client_2.4.4-2ubuntu21_armhf.deb ... 111s Unpacking gpg-wks-client (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 111s Preparing to unpack .../1-dirmngr_2.4.4-2ubuntu21_armhf.deb ... 111s Unpacking dirmngr (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 111s Preparing to unpack .../2-gpgsm_2.4.4-2ubuntu21_armhf.deb ... 111s Unpacking gpgsm (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 111s Preparing to unpack .../3-gnupg-utils_2.4.4-2ubuntu21_armhf.deb ... 111s Unpacking gnupg-utils (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 111s Preparing to unpack .../4-gpg-agent_2.4.4-2ubuntu21_armhf.deb ... 111s Unpacking gpg-agent (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 111s Preparing to unpack .../5-gpg_2.4.4-2ubuntu21_armhf.deb ... 111s Unpacking gpg (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 112s Preparing to unpack .../6-gpgconf_2.4.4-2ubuntu21_armhf.deb ... 112s Unpacking gpgconf (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 112s Preparing to unpack .../7-gnupg_2.4.4-2ubuntu21_all.deb ... 112s Unpacking gnupg (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 112s Preparing to unpack .../8-keyboxd_2.4.4-2ubuntu21_armhf.deb ... 112s Unpacking keyboxd (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 112s Preparing to unpack .../9-gpgv_2.4.4-2ubuntu21_armhf.deb ... 112s Unpacking gpgv (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 112s Setting up gpgv (2.4.4-2ubuntu21) ... 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 ... 59966 files and directories currently installed.) 112s Preparing to unpack .../console-setup-linux_1.226ubuntu3_all.deb ... 112s Unpacking console-setup-linux (1.226ubuntu3) over (1.226ubuntu2) ... 112s Preparing to unpack .../console-setup_1.226ubuntu3_all.deb ... 112s Unpacking console-setup (1.226ubuntu3) over (1.226ubuntu2) ... 112s Preparing to unpack .../keyboard-configuration_1.226ubuntu3_all.deb ... 112s Unpacking keyboard-configuration (1.226ubuntu3) over (1.226ubuntu2) ... 112s Preparing to unpack .../python3-minimal_3.12.8-1_armhf.deb ... 112s Unpacking python3-minimal (3.12.8-1) over (3.12.6-0ubuntu1) ... 112s Setting up python3-minimal (3.12.8-1) ... 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 ... 59966 files and directories currently installed.) 113s Preparing to unpack .../00-python3_3.12.8-1_armhf.deb ... 113s Unpacking python3 (3.12.8-1) over (3.12.6-0ubuntu1) ... 113s Preparing to unpack .../01-tzdata_2024b-4ubuntu1_all.deb ... 113s Unpacking tzdata (2024b-4ubuntu1) over (2024b-1ubuntu2) ... 113s Preparing to unpack .../02-python3.12_3.12.8-3_armhf.deb ... 113s Unpacking python3.12 (3.12.8-3) over (3.12.7-3) ... 113s Preparing to unpack .../03-libpython3.12-stdlib_3.12.8-3_armhf.deb ... 113s Unpacking libpython3.12-stdlib:armhf (3.12.8-3) over (3.12.7-3) ... 113s Preparing to unpack .../04-python3.12-minimal_3.12.8-3_armhf.deb ... 113s Unpacking python3.12-minimal (3.12.8-3) over (3.12.7-3) ... 113s Preparing to unpack .../05-libpython3.12-minimal_3.12.8-3_armhf.deb ... 114s Unpacking libpython3.12-minimal:armhf (3.12.8-3) over (3.12.7-3) ... 114s Preparing to unpack .../06-libpython3-stdlib_3.12.8-1_armhf.deb ... 114s Unpacking libpython3-stdlib:armhf (3.12.8-1) over (3.12.6-0ubuntu1) ... 114s Preparing to unpack .../07-rsync_3.3.0+ds1-2_armhf.deb ... 114s Unpacking rsync (3.3.0+ds1-2) over (3.3.0-1) ... 115s Preparing to unpack .../08-python-apt-common_2.9.6build1_all.deb ... 115s Unpacking python-apt-common (2.9.6build1) over (2.9.0ubuntu2) ... 115s Preparing to unpack .../09-python3-apt_2.9.6build1_armhf.deb ... 115s Unpacking python3-apt (2.9.6build1) over (2.9.0ubuntu2) ... 116s Preparing to unpack .../10-python3-problem-report_2.31.0-0ubuntu2_all.deb ... 116s Unpacking python3-problem-report (2.31.0-0ubuntu2) over (2.30.0-0ubuntu5) ... 116s Preparing to unpack .../11-python3-apport_2.31.0-0ubuntu2_all.deb ... 116s Unpacking python3-apport (2.31.0-0ubuntu2) over (2.30.0-0ubuntu5) ... 116s Preparing to unpack .../12-libglib2.0-data_2.82.4-1_all.deb ... 116s Unpacking libglib2.0-data (2.82.4-1) over (2.82.2-3) ... 116s Preparing to unpack .../13-libglib2.0-bin_2.82.4-1_armhf.deb ... 116s Unpacking libglib2.0-bin (2.82.4-1) over (2.82.2-3) ... 116s Preparing to unpack .../14-gir1.2-girepository-2.0_1.82.0-3_armhf.deb ... 116s Unpacking gir1.2-girepository-2.0:armhf (1.82.0-3) over (1.82.0-2) ... 116s Preparing to unpack .../15-gir1.2-glib-2.0_2.82.4-1_armhf.deb ... 116s Unpacking gir1.2-glib-2.0:armhf (2.82.4-1) over (2.82.2-3) ... 116s Preparing to unpack .../16-libglib2.0-0t64_2.82.4-1_armhf.deb ... 116s Unpacking libglib2.0-0t64:armhf (2.82.4-1) over (2.82.2-3) ... 116s Preparing to unpack .../17-libgirepository-1.0-1_1.82.0-3_armhf.deb ... 116s Unpacking libgirepository-1.0-1:armhf (1.82.0-3) over (1.82.0-2) ... 117s Preparing to unpack .../18-apport-core-dump-handler_2.31.0-0ubuntu2_all.deb ... 117s Unpacking apport-core-dump-handler (2.31.0-0ubuntu2) over (2.30.0-0ubuntu5) ... 117s Preparing to unpack .../19-apport_2.31.0-0ubuntu2_all.deb ... 117s Unpacking apport (2.31.0-0ubuntu2) over (2.30.0-0ubuntu5) ... 117s Preparing to unpack .../20-libcap-ng0_0.8.5-4_armhf.deb ... 117s Unpacking libcap-ng0:armhf (0.8.5-4) over (0.8.5-3build1) ... 117s Setting up libcap-ng0:armhf (0.8.5-4) ... 117s (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 ... 59953 files and directories currently installed.) 117s Preparing to unpack .../libunistring5_1.3-1_armhf.deb ... 117s Unpacking libunistring5:armhf (1.3-1) over (1.2-1) ... 117s Setting up libunistring5:armhf (1.3-1) ... 117s (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 ... 59953 files and directories currently installed.) 117s Preparing to unpack .../00-iputils-ping_3%3a20240905-1ubuntu1_armhf.deb ... 117s Unpacking iputils-ping (3:20240905-1ubuntu1) over (3:20240117-1build1) ... 117s Preparing to unpack .../01-libbpf1_1%3a1.5.0-2_armhf.deb ... 117s Unpacking libbpf1:armhf (1:1.5.0-2) over (1:1.5.0-1) ... 117s Preparing to unpack .../02-libfribidi0_1.0.16-1_armhf.deb ... 117s Unpacking libfribidi0:armhf (1.0.16-1) over (1.0.15-1) ... 118s Preparing to unpack .../03-python3-newt_0.52.24-4ubuntu1_armhf.deb ... 118s Unpacking python3-newt:armhf (0.52.24-4ubuntu1) over (0.52.24-2ubuntu4) ... 118s Preparing to unpack .../04-libnewt0.52_0.52.24-4ubuntu1_armhf.deb ... 118s Unpacking libnewt0.52:armhf (0.52.24-4ubuntu1) over (0.52.24-2ubuntu4) ... 118s Preparing to unpack .../05-libxml2_2.12.7+dfsg+really2.9.14-0.2ubuntu2_armhf.deb ... 118s Unpacking libxml2:armhf (2.12.7+dfsg+really2.9.14-0.2ubuntu2) over (2.12.7+dfsg-3) ... 118s Preparing to unpack .../06-libyaml-0-2_0.2.5-2_armhf.deb ... 118s Unpacking libyaml-0-2:armhf (0.2.5-2) over (0.2.5-1build1) ... 118s Preparing to unpack .../07-locales_2.40-4ubuntu1_all.deb ... 118s Unpacking locales (2.40-4ubuntu1) over (2.40-1ubuntu3) ... 118s Preparing to unpack .../08-openssl_3.4.0-1ubuntu2_armhf.deb ... 118s Unpacking openssl (3.4.0-1ubuntu2) over (3.3.1-2ubuntu2) ... 118s Preparing to unpack .../09-python3-rich_13.9.4-1_all.deb ... 119s Unpacking python3-rich (13.9.4-1) over (13.7.1-1) ... 119s Preparing to unpack .../10-ucf_3.0046_all.deb ... 119s Unpacking ucf (3.0046) over (3.0043+nmu1) ... 119s Preparing to unpack .../11-whiptail_0.52.24-4ubuntu1_armhf.deb ... 119s Unpacking whiptail (0.52.24-4ubuntu1) over (0.52.24-2ubuntu4) ... 119s Preparing to unpack .../12-bash-completion_1%3a2.16.0-3_all.deb ... 119s Unpacking bash-completion (1:2.16.0-3) over (1:2.14.0-2) ... 119s Preparing to unpack .../13-ethtool_1%3a6.11-1_armhf.deb ... 119s Unpacking ethtool (1:6.11-1) over (1:6.10-1) ... 119s Preparing to unpack .../14-gettext-base_0.22.5-3_armhf.deb ... 119s Unpacking gettext-base (0.22.5-3) over (0.22.5-2) ... 119s Preparing to unpack .../15-groff-base_1.23.0-7_armhf.deb ... 119s Unpacking groff-base (1.23.0-7) over (1.23.0-5) ... 119s Preparing to unpack .../16-iputils-tracepath_3%3a20240905-1ubuntu1_armhf.deb ... 119s Unpacking iputils-tracepath (3:20240905-1ubuntu1) over (3:20240117-1build1) ... 120s Preparing to unpack .../17-libpng16-16t64_1.6.44-3_armhf.deb ... 120s Unpacking libpng16-16t64:armhf (1.6.44-3) over (1.6.44-2) ... 120s Preparing to unpack .../18-libtraceevent1-plugin_1%3a1.8.4-2_armhf.deb ... 120s Unpacking libtraceevent1-plugin:armhf (1:1.8.4-2) over (1:1.8.4-1) ... 120s Preparing to unpack .../19-libtraceevent1_1%3a1.8.4-2_armhf.deb ... 120s Unpacking libtraceevent1:armhf (1:1.8.4-2) over (1:1.8.4-1) ... 120s Preparing to unpack .../20-libxkbcommon0_1.7.0-2_armhf.deb ... 120s Unpacking libxkbcommon0:armhf (1.7.0-2) over (1.7.0-1) ... 120s Preparing to unpack .../21-nano_8.3-1_armhf.deb ... 120s Unpacking nano (8.3-1) over (8.2-1) ... 120s Preparing to unpack .../22-pci.ids_0.0~2024.11.25-1_all.deb ... 120s Unpacking pci.ids (0.0~2024.11.25-1) over (0.0~2024.10.24-1) ... 120s Preparing to unpack .../23-publicsuffix_20241206.1516-0.1_all.deb ... 120s Unpacking publicsuffix (20241206.1516-0.1) over (20231001.0357-0.1) ... 120s Preparing to unpack .../24-python3.13-gdbm_3.13.1-2_armhf.deb ... 120s Unpacking python3.13-gdbm (3.13.1-2) over (3.13.0-2) ... 120s Preparing to unpack .../25-python3.12-gdbm_3.12.8-3_armhf.deb ... 120s Unpacking python3.12-gdbm (3.12.8-3) over (3.12.7-3) ... 120s Preparing to unpack .../26-python3-gdbm_3.13.1-1_armhf.deb ... 120s Unpacking python3-gdbm:armhf (3.13.1-1) over (3.12.7-1) ... 120s Preparing to unpack .../27-usb.ids_2025.01.14-1_all.deb ... 120s Unpacking usb.ids (2025.01.14-1) over (2024.07.04-1) ... 120s Preparing to unpack .../28-xauth_1%3a1.1.2-1.1_armhf.deb ... 120s Unpacking xauth (1:1.1.2-1.1) over (1:1.1.2-1build1) ... 120s Preparing to unpack .../29-libcurl3t64-gnutls_8.11.1-1ubuntu1_armhf.deb ... 120s Unpacking libcurl3t64-gnutls:armhf (8.11.1-1ubuntu1) over (8.11.0-1ubuntu2) ... 120s Preparing to unpack .../30-libappstream5_1.0.4-1_armhf.deb ... 120s Unpacking libappstream5:armhf (1.0.4-1) over (1.0.3-1) ... 120s Preparing to unpack .../31-appstream_1.0.4-1_armhf.deb ... 120s Unpacking appstream (1.0.4-1) over (1.0.3-1) ... 121s Preparing to unpack .../32-libctf0_2.43.50.20241230-1ubuntu1_armhf.deb ... 121s Unpacking libctf0:armhf (2.43.50.20241230-1ubuntu1) over (2.43.1-4ubuntu1) ... 121s Preparing to unpack .../33-libctf-nobfd0_2.43.50.20241230-1ubuntu1_armhf.deb ... 121s Unpacking libctf-nobfd0:armhf (2.43.50.20241230-1ubuntu1) over (2.43.1-4ubuntu1) ... 121s Preparing to unpack .../34-binutils-arm-linux-gnueabihf_2.43.50.20241230-1ubuntu1_armhf.deb ... 121s Unpacking binutils-arm-linux-gnueabihf (2.43.50.20241230-1ubuntu1) over (2.43.1-4ubuntu1) ... 121s Preparing to unpack .../35-libbinutils_2.43.50.20241230-1ubuntu1_armhf.deb ... 121s Unpacking libbinutils:armhf (2.43.50.20241230-1ubuntu1) over (2.43.1-4ubuntu1) ... 121s Preparing to unpack .../36-binutils_2.43.50.20241230-1ubuntu1_armhf.deb ... 121s Unpacking binutils (2.43.50.20241230-1ubuntu1) over (2.43.1-4ubuntu1) ... 121s Preparing to unpack .../37-binutils-common_2.43.50.20241230-1ubuntu1_armhf.deb ... 121s Unpacking binutils-common:armhf (2.43.50.20241230-1ubuntu1) over (2.43.1-4ubuntu1) ... 121s Preparing to unpack .../38-libsframe1_2.43.50.20241230-1ubuntu1_armhf.deb ... 121s Unpacking libsframe1:armhf (2.43.50.20241230-1ubuntu1) over (2.43.1-4ubuntu1) ... 121s Preparing to unpack .../39-python3-jinja2_3.1.3-1.1_all.deb ... 121s Unpacking python3-jinja2 (3.1.3-1.1) over (3.1.3-1ubuntu1) ... 121s Preparing to unpack .../40-python3-json-pointer_2.4-3_all.deb ... 122s Unpacking python3-json-pointer (2.4-3) over (2.4-2) ... 122s Preparing to unpack .../41-python3-jsonpatch_1.32-5_all.deb ... 122s Unpacking python3-jsonpatch (1.32-5) over (1.32-4) ... 122s Selecting previously unselected package python3-bcrypt. 122s Preparing to unpack .../42-python3-bcrypt_4.2.0-2.1_armhf.deb ... 122s Unpacking python3-bcrypt (4.2.0-2.1) ... 122s Preparing to unpack .../43-python3-cryptography_43.0.0-1_armhf.deb ... 122s Unpacking python3-cryptography (43.0.0-1) over (42.0.5-2build1) ... 122s Preparing to unpack .../44-python3-jwt_2.10.1-2_all.deb ... 122s Unpacking python3-jwt (2.10.1-2) over (2.7.0-1) ... 122s Preparing to unpack .../45-python3-oauthlib_3.2.2-3_all.deb ... 122s Unpacking python3-oauthlib (3.2.2-3) over (3.2.2-2) ... 122s Preparing to unpack .../46-cloud-init-base_25.1~2g4ee65391-0ubuntu1_all.deb ... 123s Unpacking cloud-init-base (25.1~2g4ee65391-0ubuntu1) over (24.4-0ubuntu1) ... 123s dpkg: warning: unable to delete old directory '/lib/systemd/system/sshd-keygen@.service.d': Directory not empty 123s Preparing to unpack .../47-curl_8.11.1-1ubuntu1_armhf.deb ... 123s Unpacking curl (8.11.1-1ubuntu1) over (8.11.0-1ubuntu2) ... 123s Preparing to unpack .../48-libcurl4t64_8.11.1-1ubuntu1_armhf.deb ... 123s Unpacking libcurl4t64:armhf (8.11.1-1ubuntu1) over (8.11.0-1ubuntu2) ... 123s Preparing to unpack .../49-dpkg-dev_1.22.11ubuntu4_all.deb ... 123s Unpacking dpkg-dev (1.22.11ubuntu4) over (1.22.11ubuntu3) ... 123s Preparing to unpack .../50-libdpkg-perl_1.22.11ubuntu4_all.deb ... 123s Unpacking libdpkg-perl (1.22.11ubuntu4) over (1.22.11ubuntu3) ... 124s Preparing to unpack .../51-make_4.4.1-1_armhf.deb ... 124s Unpacking make (4.4.1-1) over (4.3-4.1build2) ... 124s Preparing to unpack .../52-dracut-install_105-2ubuntu5_armhf.deb ... 124s Unpacking dracut-install (105-2ubuntu5) over (105-2ubuntu3) ... 124s Preparing to unpack .../53-libjson-glib-1.0-common_1.10.6+ds-1_all.deb ... 124s Unpacking libjson-glib-1.0-common (1.10.6+ds-1) over (1.10.0+ds-3) ... 124s Preparing to unpack .../54-libjson-glib-1.0-0_1.10.6+ds-1_armhf.deb ... 124s Unpacking libjson-glib-1.0-0:armhf (1.10.6+ds-1) over (1.10.0+ds-3) ... 124s Preparing to unpack .../55-fwupd_2.0.3-3_armhf.deb ... 124s Unpacking fwupd (2.0.3-3) over (2.0.2-1) ... 124s Preparing to unpack .../56-libfwupd3_2.0.3-3_armhf.deb ... 124s Unpacking libfwupd3:armhf (2.0.3-3) over (2.0.2-1) ... 124s Preparing to unpack .../57-libqmi-proxy_1.35.6-1_armhf.deb ... 124s Unpacking libqmi-proxy (1.35.6-1) over (1.35.2-0ubuntu2) ... 124s Preparing to unpack .../58-libqmi-glib5_1.35.6-1_armhf.deb ... 124s Unpacking libqmi-glib5:armhf (1.35.6-1) over (1.35.2-0ubuntu2) ... 125s Preparing to unpack .../59-gnupg-l10n_2.4.4-2ubuntu21_all.deb ... 125s Unpacking gnupg-l10n (2.4.4-2ubuntu21) over (2.4.4-2ubuntu18) ... 125s Preparing to unpack .../60-libftdi1-2_1.5-8_armhf.deb ... 125s Unpacking libftdi1-2:armhf (1.5-8) over (1.5-7build1) ... 125s Preparing to unpack .../61-libgpgme11t64_1.24.1-2ubuntu1_armhf.deb ... 125s Unpacking libgpgme11t64:armhf (1.24.1-2ubuntu1) over (1.24.0-2ubuntu1) ... 125s Preparing to unpack .../62-libgstreamer1.0-0_1.24.10-2_armhf.deb ... 125s Unpacking libgstreamer1.0-0:armhf (1.24.10-2) over (1.24.9-1) ... 125s Preparing to unpack .../63-libgudev-1.0-0_1%3a238-6_armhf.deb ... 125s Unpacking libgudev-1.0-0:armhf (1:238-6) over (1:238-5ubuntu1) ... 125s Selecting previously unselected package libicu76:armhf. 125s Preparing to unpack .../64-libicu76_76.1-1ubuntu2_armhf.deb ... 125s Unpacking libicu76:armhf (76.1-1ubuntu2) ... 125s Preparing to unpack .../65-libnss3_2%3a3.106-1ubuntu1_armhf.deb ... 125s Unpacking libnss3:armhf (2:3.106-1ubuntu1) over (2:3.103-1) ... 125s Preparing to unpack .../66-libwrap0_7.6.q-34_armhf.deb ... 125s Unpacking libwrap0:armhf (7.6.q-34) over (7.6.q-33) ... 125s Preparing to unpack .../67-python3-attr_24.2.0-1_all.deb ... 125s Unpacking python3-attr (24.2.0-1) over (23.2.0-2) ... 126s Preparing to unpack .../68-python3-certifi_2024.12.14+ds-1_all.deb ... 126s Unpacking python3-certifi (2024.12.14+ds-1) over (2024.8.30+dfsg-1) ... 126s Preparing to unpack .../69-python3-chardet_5.2.0+dfsg-2_all.deb ... 126s Unpacking python3-chardet (5.2.0+dfsg-2) over (5.2.0+dfsg-1) ... 126s Preparing to unpack .../70-python3-openssl_24.3.0-1_all.deb ... 126s Unpacking python3-openssl (24.3.0-1) over (24.2.1-1) ... 126s Preparing to unpack .../71-python3-pkg-resources_75.6.0-1_all.deb ... 126s Unpacking python3-pkg-resources (75.6.0-1) over (75.2.0-1) ... 126s Preparing to unpack .../72-python3-setuptools_75.6.0-1_all.deb ... 126s Unpacking python3-setuptools (75.6.0-1) over (75.2.0-1) ... 127s Preparing to unpack .../73-software-properties-common_0.108_all.deb ... 127s Unpacking software-properties-common (0.108) over (0.105) ... 127s Preparing to unpack .../74-python3-software-properties_0.108_all.deb ... 127s Unpacking python3-software-properties (0.108) over (0.105) ... 127s Preparing to unpack .../75-python3-urllib3_2.3.0-1_all.deb ... 127s Unpacking python3-urllib3 (2.3.0-1) over (2.0.7-2ubuntu0.1) ... 127s Preparing to unpack .../76-python3-wadllib_2.0.0-2_all.deb ... 127s Unpacking python3-wadllib (2.0.0-2) over (2.0.0-1) ... 127s Preparing to unpack .../77-xfsprogs_6.8.0-2.2ubuntu3_armhf.deb ... 127s Unpacking xfsprogs (6.8.0-2.2ubuntu3) over (6.8.0-2.2ubuntu2) ... 127s Preparing to unpack .../78-cloud-init_25.1~2g4ee65391-0ubuntu1_all.deb ... 127s Unpacking cloud-init (25.1~2g4ee65391-0ubuntu1) over (24.4-0ubuntu1) ... 127s Setting up systemd-sysv (257-2ubuntu1) ... 127s Setting up pci.ids (0.0~2024.11.25-1) ... 127s Setting up libnewt0.52:armhf (0.52.24-4ubuntu1) ... 127s Setting up apt-utils (2.9.18) ... 127s Setting up bsdextrautils (2.40.2-1ubuntu2) ... 127s Setting up libcurl4t64:armhf (8.11.1-1ubuntu1) ... 127s Setting up libyaml-0-2:armhf (0.2.5-2) ... 127s Setting up python3.12-gdbm (3.12.8-3) ... 127s Setting up libpython3.12-minimal:armhf (3.12.8-3) ... 127s Setting up binutils-common:armhf (2.43.50.20241230-1ubuntu1) ... 127s Setting up libcurl3t64-gnutls:armhf (8.11.1-1ubuntu1) ... 127s Setting up libctf-nobfd0:armhf (2.43.50.20241230-1ubuntu1) ... 127s Setting up gettext-base (0.22.5-3) ... 127s Setting up libnss-systemd:armhf (257-2ubuntu1) ... 127s Setting up libnss3:armhf (2:3.106-1ubuntu1) ... 127s Setting up locales (2.40-4ubuntu1) ... 128s Generating locales (this might take a while)... 131s en_US.UTF-8... done 131s Generation complete. 131s Setting up libsframe1:armhf (2.43.50.20241230-1ubuntu1) ... 131s Setting up tzdata (2024b-4ubuntu1) ... 131s 131s Current default time zone: 'Etc/UTC' 131s Local time is now: Sat Jan 18 02:32:14 UTC 2025. 131s Universal Time is now: Sat Jan 18 02:32:14 UTC 2025. 131s Run 'dpkg-reconfigure tzdata' if you wish to change it. 131s 131s Setting up eject (2.40.2-1ubuntu2) ... 131s Setting up libftdi1-2:armhf (1.5-8) ... 131s Setting up libglib2.0-data (2.82.4-1) ... 131s Setting up systemd-cryptsetup (257-2ubuntu1) ... 131s Setting up libwrap0:armhf (7.6.q-34) ... 131s Setting up make (4.4.1-1) ... 131s Setting up gnupg-l10n (2.4.4-2ubuntu21) ... 131s Setting up bash-completion (1:2.16.0-3) ... 131s Setting up libfribidi0:armhf (1.0.16-1) ... 131s Setting up libpng16-16t64:armhf (1.6.44-3) ... 131s Setting up systemd-timesyncd (257-2ubuntu1) ... 132s systemd-time-wait-sync.service is a disabled or a static unit not running, not starting it. 132s Setting up libatomic1:armhf (14.2.0-13ubuntu1) ... 132s Setting up udev (257-2ubuntu1) ... 133s Setting up usb.ids (2025.01.14-1) ... 133s Setting up ucf (3.0046) ... 133s Installing new version of config file /etc/ucf.conf ... 133s Setting up libdpkg-perl (1.22.11ubuntu4) ... 133s Setting up libfdisk1:armhf (2.40.2-1ubuntu2) ... 133s Setting up nano (8.3-1) ... 133s Installing new version of config file /etc/nanorc ... 133s Setting up whiptail (0.52.24-4ubuntu1) ... 133s Setting up python-apt-common (2.9.6build1) ... 133s Setting up dracut-install (105-2ubuntu5) ... 133s Setting up uuid-runtime (2.40.2-1ubuntu2) ... 134s uuidd.service is a disabled or a static unit not running, not starting it. 134s Setting up xauth (1:1.1.2-1.1) ... 134s Setting up groff-base (1.23.0-7) ... 134s Setting up libtraceevent1:armhf (1:1.8.4-2) ... 134s Setting up libpam-systemd:armhf (257-2ubuntu1) ... 135s Setting up libjson-glib-1.0-common (1.10.6+ds-1) ... 135s Setting up curl (8.11.1-1ubuntu1) ... 135s Setting up libicu76:armhf (76.1-1ubuntu2) ... 135s Setting up keyboard-configuration (1.226ubuntu3) ... 136s Your console font configuration will be updated the next time your system 136s boots. If you want to update it now, run 'setupcon' from a virtual console. 136s update-initramfs: deferring update (trigger activated) 136s Setting up libbinutils:armhf (2.43.50.20241230-1ubuntu1) ... 136s Setting up openssl (3.4.0-1ubuntu2) ... 136s Installing new version of config file /etc/ssl/openssl.cnf ... 136s Setting up libgpg-error-l10n (1.51-3) ... 136s Setting up iputils-ping (3:20240905-1ubuntu1) ... 136s Setting up readline-common (8.2-6) ... 136s Setting up publicsuffix (20241206.1516-0.1) ... 136s Setting up libxml2:armhf (2.12.7+dfsg+really2.9.14-0.2ubuntu2) ... 136s Setting up libbpf1:armhf (1:1.5.0-2) ... 136s Setting up iputils-tracepath (3:20240905-1ubuntu1) ... 136s Setting up rsync (3.3.0+ds1-2) ... 137s rsync.service is a disabled or a static unit not running, not starting it. 137s Setting up python3.13-gdbm (3.13.1-2) ... 137s Setting up ethtool (1:6.11-1) ... 137s Setting up gnupg-utils (2.4.4-2ubuntu21) ... 137s Setting up systemd-resolved (257-2ubuntu1) ... 138s Setting up libxkbcommon0:armhf (1.7.0-2) ... 138s Setting up libctf0:armhf (2.43.50.20241230-1ubuntu1) ... 138s Setting up python3.12-minimal (3.12.8-3) ... 139s Setting up libglib2.0-0t64:armhf (2.82.4-1) ... 139s No schema files found: doing nothing. 139s Setting up gir1.2-glib-2.0:armhf (2.82.4-1) ... 139s Setting up libreadline8t64:armhf (8.2-6) ... 139s Setting up libtraceevent1-plugin:armhf (1:1.8.4-2) ... 139s Setting up gpgconf (2.4.4-2ubuntu21) ... 139s Setting up libgirepository-1.0-1:armhf (1.82.0-3) ... 139s Setting up console-setup-linux (1.226ubuntu3) ... 141s Setting up binutils-arm-linux-gnueabihf (2.43.50.20241230-1ubuntu1) ... 141s Setting up gpg (2.4.4-2ubuntu21) ... 141s Setting up libgudev-1.0-0:armhf (1:238-6) ... 141s Setting up libgstreamer1.0-0:armhf (1.24.10-2) ... 141s Setcap worked! gst-ptp-helper is not suid! 141s Setting up console-setup (1.226ubuntu3) ... 142s update-initramfs: deferring update (trigger activated) 142s Setting up gpg-agent (2.4.4-2ubuntu21) ... 143s Setting up libpython3.12-stdlib:armhf (3.12.8-3) ... 143s Setting up python3.12 (3.12.8-3) ... 144s Setting up gpgsm (2.4.4-2ubuntu21) ... 144s Setting up libglib2.0-bin (2.82.4-1) ... 144s Setting up libappstream5:armhf (1.0.4-1) ... 144s Setting up libqmi-glib5:armhf (1.35.6-1) ... 144s Setting up binutils (2.43.50.20241230-1ubuntu1) ... 144s Setting up fdisk (2.40.2-1ubuntu2) ... 144s Setting up dpkg-dev (1.22.11ubuntu4) ... 144s Setting up libjson-glib-1.0-0:armhf (1.10.6+ds-1) ... 144s Setting up dirmngr (2.4.4-2ubuntu21) ... 144s Setting up appstream (1.0.4-1) ... 145s ✔ Metadata cache was updated successfully. 145s Setting up gir1.2-girepository-2.0:armhf (1.82.0-3) ... 145s Setting up keyboxd (2.4.4-2ubuntu21) ... 145s Setting up gnupg (2.4.4-2ubuntu21) ... 145s Setting up libgpgme11t64:armhf (1.24.1-2ubuntu1) ... 145s Setting up libpython3-stdlib:armhf (3.12.8-1) ... 145s Setting up gpg-wks-client (2.4.4-2ubuntu21) ... 145s Setting up libqmi-proxy (1.35.6-1) ... 145s Setting up libfwupd3:armhf (2.0.3-3) ... 145s Setting up python3 (3.12.8-1) ... 145s Setting up python3-newt:armhf (0.52.24-4ubuntu1) ... 145s Setting up python3-jinja2 (3.1.3-1.1) ... 146s Setting up python3-chardet (5.2.0+dfsg-2) ... 146s Setting up python3-certifi (2024.12.14+ds-1) ... 146s Setting up python3-wadllib (2.0.0-2) ... 146s Setting up xfsprogs (6.8.0-2.2ubuntu3) ... 146s update-initramfs: deferring update (trigger activated) 147s Setting up python3-urllib3 (2.3.0-1) ... 147s Setting up python3-json-pointer (2.4-3) ... 147s Setting up fwupd (2.0.3-3) ... 148s fwupd-refresh.service is a disabled or a static unit not running, not starting it. 148s fwupd.service is a disabled or a static unit not running, not starting it. 148s Setting up python3-pkg-resources (75.6.0-1) ... 148s Setting up python3-attr (24.2.0-1) ... 148s Setting up python3-setuptools (75.6.0-1) ... 149s Setting up python3-jwt (2.10.1-2) ... 150s Setting up python3-rich (13.9.4-1) ... 150s Setting up python3-gdbm:armhf (3.13.1-1) ... 150s Setting up python3-problem-report (2.31.0-0ubuntu2) ... 150s Setting up python3-apt (2.9.6build1) ... 150s Setting up python3-jsonpatch (1.32-5) ... 150s Setting up python3-bcrypt (4.2.0-2.1) ... 151s Setting up python3-apport (2.31.0-0ubuntu2) ... 151s Setting up python3-software-properties (0.108) ... 151s Setting up python3-cryptography (43.0.0-1) ... 151s Setting up python3-openssl (24.3.0-1) ... 152s Setting up software-properties-common (0.108) ... 152s Setting up python3-oauthlib (3.2.2-3) ... 152s Setting up cloud-init-base (25.1~2g4ee65391-0ubuntu1) ... 152s Installing new version of config file /etc/cloud/templates/sources.list.debian.deb822.tmpl ... 152s Installing new version of config file /etc/cloud/templates/sources.list.ubuntu.deb822.tmpl ... 154s Setting up cloud-init (25.1~2g4ee65391-0ubuntu1) ... 154s Setting up apport-core-dump-handler (2.31.0-0ubuntu2) ... 155s Setting up apport (2.31.0-0ubuntu2) ... 156s apport-autoreport.service is a disabled or a static unit not running, not starting it. 156s Processing triggers for dbus (1.14.10-4ubuntu5) ... 156s Processing triggers for shared-mime-info (2.4-5) ... 156s Warning: program compiled against libxml 212 using older 209 157s Processing triggers for debianutils (5.21) ... 157s Processing triggers for install-info (7.1.1-1) ... 157s Processing triggers for initramfs-tools (0.142ubuntu35) ... 157s Processing triggers for libc-bin (2.40-4ubuntu1) ... 157s Processing triggers for rsyslog (8.2406.0-1ubuntu2) ... 157s Processing triggers for systemd (257-2ubuntu1) ... 157s Processing triggers for man-db (2.13.0-1) ... 163s Reading package lists... 163s Building dependency tree... 163s Reading state information... 164s Starting pkgProblemResolver with broken count: 0 164s Starting 2 pkgProblemResolver with broken count: 0 164s Done 165s The following packages will be REMOVED: 165s libassuan0* libicu74* 165s 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. 165s After this operation, 34.7 MB disk space will be freed. 165s (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 ... 60022 files and directories currently installed.) 165s Removing libassuan0:armhf (2.5.6-1build1) ... 165s Removing libicu74:armhf (74.2-1ubuntu4) ... 165s Processing triggers for libc-bin (2.40-4ubuntu1) ... 168s autopkgtest [02:32:51]: rebooting testbed after setup commands that affected boot 210s autopkgtest [02:33:33]: testbed running kernel: Linux 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 18:12:14 UTC 2 236s autopkgtest [02:33:59]: @@@@@@@@@@@@@@@@@@@@ apt-source vcr.py 250s Get:1 http://ftpmaster.internal/ubuntu plucky/universe vcr.py 6.0.2-2 (dsc) [2977 B] 250s Get:2 http://ftpmaster.internal/ubuntu plucky/universe vcr.py 6.0.2-2 (tar) [339 kB] 250s Get:3 http://ftpmaster.internal/ubuntu plucky/universe vcr.py 6.0.2-2 (diff) [6348 B] 250s gpgv: Signature made Tue Dec 17 14:55:48 2024 UTC 250s gpgv: using RSA key AC0A4FF12611B6FCCF01C111393587D97D86500B 250s gpgv: Can't check signature: No public key 250s dpkg-source: warning: cannot verify inline signature for ./vcr.py_6.0.2-2.dsc: no acceptable signature found 250s autopkgtest [02:34:13]: testing package vcr.py version 6.0.2-2 252s autopkgtest [02:34:15]: build not needed 255s autopkgtest [02:34:18]: test pybuild-autopkgtest: preparing testbed 257s Reading package lists... 257s Building dependency tree... 257s Reading state information... 257s Starting pkgProblemResolver with broken count: 0 258s Starting 2 pkgProblemResolver with broken count: 0 258s Done 258s The following NEW packages will be installed: 258s autoconf automake autopoint autotools-dev build-essential cpp cpp-14 258s cpp-14-arm-linux-gnueabihf cpp-arm-linux-gnueabihf debhelper debugedit 258s dh-autoreconf dh-python dh-strip-nondeterminism docutils-common dwz 258s fonts-font-awesome fonts-lato g++ g++-14 g++-14-arm-linux-gnueabihf 258s g++-arm-linux-gnueabihf gcc gcc-14 gcc-14-arm-linux-gnueabihf 258s gcc-arm-linux-gnueabihf gettext intltool-debian libarchive-zip-perl libasan8 258s libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libdebhelper-perl 258s libfile-stripnondeterminism-perl libgcc-14-dev libgomp1 libisl23 258s libjs-jquery libjs-sphinxdoc libjs-underscore libjson-perl liblua5.4-0 258s libmpc3 libpython3.13-minimal libpython3.13-stdlib libstdc++-14-dev libtool 258s libubsan1 linux-libc-dev m4 pandoc pandoc-data po-debconf 258s pybuild-plugin-autopkgtest python-vcr-doc python3-aiohappyeyeballs 258s python3-aiohttp python3-aiosignal python3-alabaster python3-all 258s python3-async-timeout python3-boto3 python3-botocore python3-brotli 259s python3-brotlicffi python3-click python3-dateutil python3-decorator 259s python3-defusedxml python3-docutils python3-flasgger python3-flask 259s python3-frozenlist python3-greenlet python3-httpbin python3-imagesize 259s python3-iniconfig python3-itsdangerous python3-jmespath python3-mistune 259s python3-multidict python3-packaging python3-pluggy python3-pytest 259s python3-pytest-httpbin python3-pytest-tornado python3-roman 259s python3-s3transfer python3-six python3-snowballstemmer python3-sphinx 259s python3-sphinx-rtd-theme python3-sphinxcontrib.jquery python3-tornado 259s python3-vcr python3-werkzeug python3-wrapt python3-yarl python3.13 259s python3.13-minimal rpcsvc-proto sphinx-common sphinx-rtd-theme-common 259s 0 upgraded, 105 newly installed, 0 to remove and 0 not upgraded. 259s Need to get 114 MB of archives. 259s After this operation, 570 MB of additional disk space will be used. 259s Get:1 http://ftpmaster.internal/ubuntu plucky/main armhf fonts-lato all 2.015-1 [2781 kB] 259s Get:2 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3.13-minimal armhf 3.13.1-2 [868 kB] 259s Get:3 http://ftpmaster.internal/ubuntu plucky/main armhf python3.13-minimal armhf 3.13.1-2 [2036 kB] 259s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf m4 armhf 1.4.19-4build1 [235 kB] 259s Get:5 http://ftpmaster.internal/ubuntu plucky/main armhf autoconf all 2.72-3 [382 kB] 259s Get:6 http://ftpmaster.internal/ubuntu plucky/main armhf autotools-dev all 20220109.1 [44.9 kB] 259s Get:7 http://ftpmaster.internal/ubuntu plucky/main armhf automake all 1:1.16.5-1.3ubuntu1 [558 kB] 259s Get:8 http://ftpmaster.internal/ubuntu plucky/main armhf autopoint all 0.22.5-3 [616 kB] 259s Get:9 http://ftpmaster.internal/ubuntu plucky/main armhf libc-dev-bin armhf 2.40-4ubuntu1 [19.2 kB] 259s Get:10 http://ftpmaster.internal/ubuntu plucky/main armhf linux-libc-dev armhf 6.11.0-8.8 [1628 kB] 259s Get:11 http://ftpmaster.internal/ubuntu plucky/main armhf libcrypt-dev armhf 1:4.4.36-5 [119 kB] 259s Get:12 http://ftpmaster.internal/ubuntu plucky/main armhf rpcsvc-proto armhf 1.4.2-0ubuntu7 [62.2 kB] 259s Get:13 http://ftpmaster.internal/ubuntu plucky/main armhf libc6-dev armhf 2.40-4ubuntu1 [1358 kB] 259s Get:14 http://ftpmaster.internal/ubuntu plucky/main armhf libisl23 armhf 0.27-1 [546 kB] 260s Get:15 http://ftpmaster.internal/ubuntu plucky/main armhf libmpc3 armhf 1.3.1-1build2 [47.1 kB] 260s Get:16 http://ftpmaster.internal/ubuntu plucky/main armhf cpp-14-arm-linux-gnueabihf armhf 14.2.0-13ubuntu1 [9221 kB] 260s Get:17 http://ftpmaster.internal/ubuntu plucky/main armhf cpp-14 armhf 14.2.0-13ubuntu1 [1032 B] 260s Get:18 http://ftpmaster.internal/ubuntu plucky/main armhf cpp-arm-linux-gnueabihf armhf 4:14.1.0-2ubuntu1 [5464 B] 260s Get:19 http://ftpmaster.internal/ubuntu plucky/main armhf cpp armhf 4:14.1.0-2ubuntu1 [22.4 kB] 260s Get:20 http://ftpmaster.internal/ubuntu plucky/main armhf libcc1-0 armhf 14.2.0-13ubuntu1 [43.4 kB] 260s Get:21 http://ftpmaster.internal/ubuntu plucky/main armhf libgomp1 armhf 14.2.0-13ubuntu1 [125 kB] 260s Get:22 http://ftpmaster.internal/ubuntu plucky/main armhf libasan8 armhf 14.2.0-13ubuntu1 [2901 kB] 260s Get:23 http://ftpmaster.internal/ubuntu plucky/main armhf libubsan1 armhf 14.2.0-13ubuntu1 [1151 kB] 260s Get:24 http://ftpmaster.internal/ubuntu plucky/main armhf libgcc-14-dev armhf 14.2.0-13ubuntu1 [897 kB] 260s Get:25 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-14-arm-linux-gnueabihf armhf 14.2.0-13ubuntu1 [18.0 MB] 260s Get:26 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-14 armhf 14.2.0-13ubuntu1 [504 kB] 260s Get:27 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-arm-linux-gnueabihf armhf 4:14.1.0-2ubuntu1 [1222 B] 260s Get:28 http://ftpmaster.internal/ubuntu plucky/main armhf gcc armhf 4:14.1.0-2ubuntu1 [5002 B] 260s Get:29 http://ftpmaster.internal/ubuntu plucky/main armhf libstdc++-14-dev armhf 14.2.0-13ubuntu1 [2572 kB] 261s Get:30 http://ftpmaster.internal/ubuntu plucky/main armhf g++-14-arm-linux-gnueabihf armhf 14.2.0-13ubuntu1 [10.5 MB] 261s Get:31 http://ftpmaster.internal/ubuntu plucky/main armhf g++-14 armhf 14.2.0-13ubuntu1 [21.1 kB] 261s Get:32 http://ftpmaster.internal/ubuntu plucky/main armhf g++-arm-linux-gnueabihf armhf 4:14.1.0-2ubuntu1 [968 B] 261s Get:33 http://ftpmaster.internal/ubuntu plucky/main armhf g++ armhf 4:14.1.0-2ubuntu1 [1084 B] 261s Get:34 http://ftpmaster.internal/ubuntu plucky/main armhf build-essential armhf 12.10ubuntu1 [4928 B] 261s Get:35 http://ftpmaster.internal/ubuntu plucky/main armhf libdebhelper-perl all 13.20ubuntu1 [94.2 kB] 261s Get:36 http://ftpmaster.internal/ubuntu plucky/main armhf libtool all 2.4.7-8 [166 kB] 261s Get:37 http://ftpmaster.internal/ubuntu plucky/main armhf dh-autoreconf all 20 [16.1 kB] 261s Get:38 http://ftpmaster.internal/ubuntu plucky/main armhf libarchive-zip-perl all 1.68-1 [90.2 kB] 261s Get:39 http://ftpmaster.internal/ubuntu plucky/main armhf libfile-stripnondeterminism-perl all 1.14.0-1 [20.1 kB] 261s Get:40 http://ftpmaster.internal/ubuntu plucky/main armhf dh-strip-nondeterminism all 1.14.0-1 [5058 B] 261s Get:41 http://ftpmaster.internal/ubuntu plucky/main armhf debugedit armhf 1:5.1-1 [46.5 kB] 261s Get:42 http://ftpmaster.internal/ubuntu plucky/main armhf dwz armhf 0.15-1build6 [116 kB] 261s Get:43 http://ftpmaster.internal/ubuntu plucky/main armhf gettext armhf 0.22.5-3 [999 kB] 261s Get:44 http://ftpmaster.internal/ubuntu plucky/main armhf intltool-debian all 0.35.0+20060710.6 [23.2 kB] 261s Get:45 http://ftpmaster.internal/ubuntu plucky/main armhf po-debconf all 1.0.21+nmu1 [233 kB] 261s Get:46 http://ftpmaster.internal/ubuntu plucky/main armhf debhelper all 13.20ubuntu1 [893 kB] 261s Get:47 http://ftpmaster.internal/ubuntu plucky/universe armhf dh-python all 6.20241217 [117 kB] 261s Get:48 http://ftpmaster.internal/ubuntu plucky/main armhf docutils-common all 0.21.2+dfsg-2 [131 kB] 261s Get:49 http://ftpmaster.internal/ubuntu plucky/main armhf fonts-font-awesome all 5.0.10+really4.7.0~dfsg-4.1 [516 kB] 261s Get:50 http://ftpmaster.internal/ubuntu plucky/main armhf libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 261s Get:51 http://ftpmaster.internal/ubuntu plucky/main armhf libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 261s Get:52 http://ftpmaster.internal/ubuntu plucky/main armhf libjs-sphinxdoc all 8.1.3-3 [30.9 kB] 261s Get:53 http://ftpmaster.internal/ubuntu plucky/main armhf libjson-perl all 4.10000-1 [81.9 kB] 261s Get:54 http://ftpmaster.internal/ubuntu plucky/main armhf liblua5.4-0 armhf 5.4.7-1 [134 kB] 261s Get:55 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3.13-stdlib armhf 3.13.1-2 [1970 kB] 261s Get:56 http://ftpmaster.internal/ubuntu plucky/universe armhf pandoc-data all 3.1.11.1-3build1 [78.8 kB] 261s Get:57 http://ftpmaster.internal/ubuntu plucky/universe armhf pandoc armhf 3.1.11.1+ds-2 [36.7 MB] 262s Get:58 http://ftpmaster.internal/ubuntu plucky/universe armhf pybuild-plugin-autopkgtest all 6.20241217 [1746 B] 262s Get:59 http://ftpmaster.internal/ubuntu plucky/universe armhf python-vcr-doc all 6.0.2-2 [184 kB] 262s Get:60 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-aiohappyeyeballs all 2.4.4-2 [10.6 kB] 262s Get:61 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-multidict armhf 6.1.0-1build1 [34.6 kB] 262s Get:62 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-yarl armhf 1.13.1-1build1 [111 kB] 262s Get:63 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-async-timeout all 5.0.1-1 [6830 B] 262s Get:64 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-frozenlist armhf 1.5.0-1build1 [56.1 kB] 262s Get:65 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-aiosignal all 1.3.2-1 [5182 B] 262s Get:66 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-aiohttp armhf 3.10.11-1 [339 kB] 262s Get:67 http://ftpmaster.internal/ubuntu plucky/main armhf python3.13 armhf 3.13.1-2 [729 kB] 262s Get:68 http://ftpmaster.internal/ubuntu plucky/main armhf python3-all armhf 3.12.8-1 [892 B] 262s Get:69 http://ftpmaster.internal/ubuntu plucky/main armhf python3-dateutil all 2.9.0-3 [80.2 kB] 262s Get:70 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jmespath all 1.0.1-1 [21.3 kB] 262s Get:71 http://ftpmaster.internal/ubuntu plucky/main armhf python3-six all 1.17.0-1 [13.2 kB] 262s Get:72 http://ftpmaster.internal/ubuntu plucky/main armhf python3-botocore all 1.34.46+repack-1ubuntu1 [6211 kB] 262s Get:73 http://ftpmaster.internal/ubuntu plucky/main armhf python3-s3transfer all 0.10.1-1ubuntu2 [54.3 kB] 262s Get:74 http://ftpmaster.internal/ubuntu plucky/main armhf python3-boto3 all 1.34.46+dfsg-1ubuntu1 [72.5 kB] 262s Get:75 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-brotli armhf 1.1.0-2build3 [324 kB] 262s Get:76 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-brotlicffi armhf 1.1.0.0+ds1-1 [17.6 kB] 262s Get:77 http://ftpmaster.internal/ubuntu plucky/main armhf python3-click all 8.1.8-1 [79.8 kB] 262s Get:78 http://ftpmaster.internal/ubuntu plucky/main armhf python3-decorator all 5.1.1-5 [10.1 kB] 262s Get:79 http://ftpmaster.internal/ubuntu plucky/main armhf python3-defusedxml all 0.7.1-3 [42.2 kB] 262s Get:80 http://ftpmaster.internal/ubuntu plucky/main armhf python3-roman all 4.2-1 [10.0 kB] 262s Get:81 http://ftpmaster.internal/ubuntu plucky/main armhf python3-docutils all 0.21.2+dfsg-2 [409 kB] 262s Get:82 http://ftpmaster.internal/ubuntu plucky/main armhf python3-itsdangerous all 2.2.0-1 [15.2 kB] 262s Get:83 http://ftpmaster.internal/ubuntu plucky/main armhf python3-werkzeug all 3.1.3-2 [169 kB] 262s Get:84 http://ftpmaster.internal/ubuntu plucky/main armhf python3-flask all 3.1.0-2ubuntu1 [84.4 kB] 262s Get:85 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-mistune all 3.0.2-2 [32.9 kB] 262s Get:86 http://ftpmaster.internal/ubuntu plucky/main armhf python3-packaging all 24.2-1 [51.5 kB] 262s Get:87 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-flasgger all 0.9.7.2~dev2+dfsg-3 [1693 kB] 263s Get:88 http://ftpmaster.internal/ubuntu plucky/main armhf python3-greenlet armhf 3.1.0-1 [175 kB] 263s Get:89 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-httpbin all 0.10.2+dfsg-2 [89.0 kB] 263s Get:90 http://ftpmaster.internal/ubuntu plucky/main armhf python3-imagesize all 1.4.1-1 [6844 B] 263s Get:91 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-iniconfig all 1.1.1-2 [6024 B] 263s Get:92 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pluggy all 1.5.0-1 [21.0 kB] 263s Get:93 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pytest all 8.3.4-1 [252 kB] 263s Get:94 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pytest-httpbin all 2.1.0-1 [13.0 kB] 263s Get:95 http://ftpmaster.internal/ubuntu plucky/main armhf python3-tornado armhf 6.4.1-3 [298 kB] 263s Get:96 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pytest-tornado all 0.8.1-3 [7180 B] 263s Get:97 http://ftpmaster.internal/ubuntu plucky/main armhf python3-snowballstemmer all 2.2.0-4build1 [59.8 kB] 263s Get:98 http://ftpmaster.internal/ubuntu plucky/main armhf sphinx-common all 8.1.3-3 [661 kB] 263s Get:99 http://ftpmaster.internal/ubuntu plucky/main armhf python3-alabaster all 0.7.16-0.1 [18.5 kB] 263s Get:100 http://ftpmaster.internal/ubuntu plucky/main armhf python3-sphinx all 8.1.3-3 [474 kB] 263s Get:101 http://ftpmaster.internal/ubuntu plucky/main armhf sphinx-rtd-theme-common all 3.0.2+dfsg-1 [1014 kB] 263s Get:102 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-sphinxcontrib.jquery all 4.1-5 [6678 B] 263s Get:103 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-sphinx-rtd-theme all 3.0.2+dfsg-1 [23.5 kB] 263s Get:104 http://ftpmaster.internal/ubuntu plucky/main armhf python3-wrapt armhf 1.15.0-4 [32.5 kB] 263s Get:105 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-vcr all 6.0.2-2 [33.0 kB] 264s Fetched 114 MB in 4s (25.5 MB/s) 264s Selecting previously unselected package fonts-lato. 264s (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 ... 60001 files and directories currently installed.) 264s Preparing to unpack .../000-fonts-lato_2.015-1_all.deb ... 264s Unpacking fonts-lato (2.015-1) ... 264s Selecting previously unselected package libpython3.13-minimal:armhf. 264s Preparing to unpack .../001-libpython3.13-minimal_3.13.1-2_armhf.deb ... 264s Unpacking libpython3.13-minimal:armhf (3.13.1-2) ... 264s Selecting previously unselected package python3.13-minimal. 264s Preparing to unpack .../002-python3.13-minimal_3.13.1-2_armhf.deb ... 264s Unpacking python3.13-minimal (3.13.1-2) ... 264s Selecting previously unselected package m4. 264s Preparing to unpack .../003-m4_1.4.19-4build1_armhf.deb ... 264s Unpacking m4 (1.4.19-4build1) ... 264s Selecting previously unselected package autoconf. 264s Preparing to unpack .../004-autoconf_2.72-3_all.deb ... 264s Unpacking autoconf (2.72-3) ... 264s Selecting previously unselected package autotools-dev. 264s Preparing to unpack .../005-autotools-dev_20220109.1_all.deb ... 264s Unpacking autotools-dev (20220109.1) ... 264s Selecting previously unselected package automake. 264s Preparing to unpack .../006-automake_1%3a1.16.5-1.3ubuntu1_all.deb ... 264s Unpacking automake (1:1.16.5-1.3ubuntu1) ... 264s Selecting previously unselected package autopoint. 264s Preparing to unpack .../007-autopoint_0.22.5-3_all.deb ... 264s Unpacking autopoint (0.22.5-3) ... 264s Selecting previously unselected package libc-dev-bin. 264s Preparing to unpack .../008-libc-dev-bin_2.40-4ubuntu1_armhf.deb ... 264s Unpacking libc-dev-bin (2.40-4ubuntu1) ... 264s Selecting previously unselected package linux-libc-dev:armhf. 264s Preparing to unpack .../009-linux-libc-dev_6.11.0-8.8_armhf.deb ... 264s Unpacking linux-libc-dev:armhf (6.11.0-8.8) ... 264s Selecting previously unselected package libcrypt-dev:armhf. 264s Preparing to unpack .../010-libcrypt-dev_1%3a4.4.36-5_armhf.deb ... 264s Unpacking libcrypt-dev:armhf (1:4.4.36-5) ... 264s Selecting previously unselected package rpcsvc-proto. 264s Preparing to unpack .../011-rpcsvc-proto_1.4.2-0ubuntu7_armhf.deb ... 264s Unpacking rpcsvc-proto (1.4.2-0ubuntu7) ... 264s Selecting previously unselected package libc6-dev:armhf. 264s Preparing to unpack .../012-libc6-dev_2.40-4ubuntu1_armhf.deb ... 264s Unpacking libc6-dev:armhf (2.40-4ubuntu1) ... 265s Selecting previously unselected package libisl23:armhf. 265s Preparing to unpack .../013-libisl23_0.27-1_armhf.deb ... 265s Unpacking libisl23:armhf (0.27-1) ... 265s Selecting previously unselected package libmpc3:armhf. 265s Preparing to unpack .../014-libmpc3_1.3.1-1build2_armhf.deb ... 265s Unpacking libmpc3:armhf (1.3.1-1build2) ... 265s Selecting previously unselected package cpp-14-arm-linux-gnueabihf. 265s Preparing to unpack .../015-cpp-14-arm-linux-gnueabihf_14.2.0-13ubuntu1_armhf.deb ... 265s Unpacking cpp-14-arm-linux-gnueabihf (14.2.0-13ubuntu1) ... 265s Selecting previously unselected package cpp-14. 265s Preparing to unpack .../016-cpp-14_14.2.0-13ubuntu1_armhf.deb ... 265s Unpacking cpp-14 (14.2.0-13ubuntu1) ... 265s Selecting previously unselected package cpp-arm-linux-gnueabihf. 265s Preparing to unpack .../017-cpp-arm-linux-gnueabihf_4%3a14.1.0-2ubuntu1_armhf.deb ... 265s Unpacking cpp-arm-linux-gnueabihf (4:14.1.0-2ubuntu1) ... 265s Selecting previously unselected package cpp. 265s Preparing to unpack .../018-cpp_4%3a14.1.0-2ubuntu1_armhf.deb ... 265s Unpacking cpp (4:14.1.0-2ubuntu1) ... 265s Selecting previously unselected package libcc1-0:armhf. 265s Preparing to unpack .../019-libcc1-0_14.2.0-13ubuntu1_armhf.deb ... 265s Unpacking libcc1-0:armhf (14.2.0-13ubuntu1) ... 265s Selecting previously unselected package libgomp1:armhf. 265s Preparing to unpack .../020-libgomp1_14.2.0-13ubuntu1_armhf.deb ... 265s Unpacking libgomp1:armhf (14.2.0-13ubuntu1) ... 265s Selecting previously unselected package libasan8:armhf. 265s Preparing to unpack .../021-libasan8_14.2.0-13ubuntu1_armhf.deb ... 265s Unpacking libasan8:armhf (14.2.0-13ubuntu1) ... 265s Selecting previously unselected package libubsan1:armhf. 265s Preparing to unpack .../022-libubsan1_14.2.0-13ubuntu1_armhf.deb ... 265s Unpacking libubsan1:armhf (14.2.0-13ubuntu1) ... 265s Selecting previously unselected package libgcc-14-dev:armhf. 265s Preparing to unpack .../023-libgcc-14-dev_14.2.0-13ubuntu1_armhf.deb ... 265s Unpacking libgcc-14-dev:armhf (14.2.0-13ubuntu1) ... 265s Selecting previously unselected package gcc-14-arm-linux-gnueabihf. 265s Preparing to unpack .../024-gcc-14-arm-linux-gnueabihf_14.2.0-13ubuntu1_armhf.deb ... 265s Unpacking gcc-14-arm-linux-gnueabihf (14.2.0-13ubuntu1) ... 266s Selecting previously unselected package gcc-14. 266s Preparing to unpack .../025-gcc-14_14.2.0-13ubuntu1_armhf.deb ... 266s Unpacking gcc-14 (14.2.0-13ubuntu1) ... 266s Selecting previously unselected package gcc-arm-linux-gnueabihf. 266s Preparing to unpack .../026-gcc-arm-linux-gnueabihf_4%3a14.1.0-2ubuntu1_armhf.deb ... 266s Unpacking gcc-arm-linux-gnueabihf (4:14.1.0-2ubuntu1) ... 266s Selecting previously unselected package gcc. 266s Preparing to unpack .../027-gcc_4%3a14.1.0-2ubuntu1_armhf.deb ... 266s Unpacking gcc (4:14.1.0-2ubuntu1) ... 266s Selecting previously unselected package libstdc++-14-dev:armhf. 266s Preparing to unpack .../028-libstdc++-14-dev_14.2.0-13ubuntu1_armhf.deb ... 266s Unpacking libstdc++-14-dev:armhf (14.2.0-13ubuntu1) ... 266s Selecting previously unselected package g++-14-arm-linux-gnueabihf. 266s Preparing to unpack .../029-g++-14-arm-linux-gnueabihf_14.2.0-13ubuntu1_armhf.deb ... 266s Unpacking g++-14-arm-linux-gnueabihf (14.2.0-13ubuntu1) ... 266s Selecting previously unselected package g++-14. 266s Preparing to unpack .../030-g++-14_14.2.0-13ubuntu1_armhf.deb ... 266s Unpacking g++-14 (14.2.0-13ubuntu1) ... 266s Selecting previously unselected package g++-arm-linux-gnueabihf. 266s Preparing to unpack .../031-g++-arm-linux-gnueabihf_4%3a14.1.0-2ubuntu1_armhf.deb ... 266s Unpacking g++-arm-linux-gnueabihf (4:14.1.0-2ubuntu1) ... 266s Selecting previously unselected package g++. 266s Preparing to unpack .../032-g++_4%3a14.1.0-2ubuntu1_armhf.deb ... 266s Unpacking g++ (4:14.1.0-2ubuntu1) ... 266s Selecting previously unselected package build-essential. 266s Preparing to unpack .../033-build-essential_12.10ubuntu1_armhf.deb ... 266s Unpacking build-essential (12.10ubuntu1) ... 266s Selecting previously unselected package libdebhelper-perl. 266s Preparing to unpack .../034-libdebhelper-perl_13.20ubuntu1_all.deb ... 266s Unpacking libdebhelper-perl (13.20ubuntu1) ... 266s Selecting previously unselected package libtool. 266s Preparing to unpack .../035-libtool_2.4.7-8_all.deb ... 266s Unpacking libtool (2.4.7-8) ... 266s Selecting previously unselected package dh-autoreconf. 267s Preparing to unpack .../036-dh-autoreconf_20_all.deb ... 267s Unpacking dh-autoreconf (20) ... 267s Selecting previously unselected package libarchive-zip-perl. 267s Preparing to unpack .../037-libarchive-zip-perl_1.68-1_all.deb ... 267s Unpacking libarchive-zip-perl (1.68-1) ... 267s Selecting previously unselected package libfile-stripnondeterminism-perl. 267s Preparing to unpack .../038-libfile-stripnondeterminism-perl_1.14.0-1_all.deb ... 267s Unpacking libfile-stripnondeterminism-perl (1.14.0-1) ... 267s Selecting previously unselected package dh-strip-nondeterminism. 267s Preparing to unpack .../039-dh-strip-nondeterminism_1.14.0-1_all.deb ... 267s Unpacking dh-strip-nondeterminism (1.14.0-1) ... 267s Selecting previously unselected package debugedit. 267s Preparing to unpack .../040-debugedit_1%3a5.1-1_armhf.deb ... 267s Unpacking debugedit (1:5.1-1) ... 267s Selecting previously unselected package dwz. 267s Preparing to unpack .../041-dwz_0.15-1build6_armhf.deb ... 267s Unpacking dwz (0.15-1build6) ... 267s Selecting previously unselected package gettext. 267s Preparing to unpack .../042-gettext_0.22.5-3_armhf.deb ... 267s Unpacking gettext (0.22.5-3) ... 267s Selecting previously unselected package intltool-debian. 267s Preparing to unpack .../043-intltool-debian_0.35.0+20060710.6_all.deb ... 267s Unpacking intltool-debian (0.35.0+20060710.6) ... 267s Selecting previously unselected package po-debconf. 267s Preparing to unpack .../044-po-debconf_1.0.21+nmu1_all.deb ... 267s Unpacking po-debconf (1.0.21+nmu1) ... 267s Selecting previously unselected package debhelper. 267s Preparing to unpack .../045-debhelper_13.20ubuntu1_all.deb ... 267s Unpacking debhelper (13.20ubuntu1) ... 267s Selecting previously unselected package dh-python. 267s Preparing to unpack .../046-dh-python_6.20241217_all.deb ... 267s Unpacking dh-python (6.20241217) ... 267s Selecting previously unselected package docutils-common. 267s Preparing to unpack .../047-docutils-common_0.21.2+dfsg-2_all.deb ... 267s Unpacking docutils-common (0.21.2+dfsg-2) ... 267s Selecting previously unselected package fonts-font-awesome. 267s Preparing to unpack .../048-fonts-font-awesome_5.0.10+really4.7.0~dfsg-4.1_all.deb ... 267s Unpacking fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1) ... 267s Selecting previously unselected package libjs-jquery. 267s Preparing to unpack .../049-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 267s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 267s Selecting previously unselected package libjs-underscore. 267s Preparing to unpack .../050-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 267s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 267s Selecting previously unselected package libjs-sphinxdoc. 267s Preparing to unpack .../051-libjs-sphinxdoc_8.1.3-3_all.deb ... 267s Unpacking libjs-sphinxdoc (8.1.3-3) ... 267s Selecting previously unselected package libjson-perl. 267s Preparing to unpack .../052-libjson-perl_4.10000-1_all.deb ... 267s Unpacking libjson-perl (4.10000-1) ... 267s Selecting previously unselected package liblua5.4-0:armhf. 267s Preparing to unpack .../053-liblua5.4-0_5.4.7-1_armhf.deb ... 267s Unpacking liblua5.4-0:armhf (5.4.7-1) ... 267s Selecting previously unselected package libpython3.13-stdlib:armhf. 267s Preparing to unpack .../054-libpython3.13-stdlib_3.13.1-2_armhf.deb ... 267s Unpacking libpython3.13-stdlib:armhf (3.13.1-2) ... 267s Selecting previously unselected package pandoc-data. 267s Preparing to unpack .../055-pandoc-data_3.1.11.1-3build1_all.deb ... 267s Unpacking pandoc-data (3.1.11.1-3build1) ... 267s Selecting previously unselected package pandoc. 267s Preparing to unpack .../056-pandoc_3.1.11.1+ds-2_armhf.deb ... 267s Unpacking pandoc (3.1.11.1+ds-2) ... 269s Selecting previously unselected package pybuild-plugin-autopkgtest. 269s Preparing to unpack .../057-pybuild-plugin-autopkgtest_6.20241217_all.deb ... 269s Unpacking pybuild-plugin-autopkgtest (6.20241217) ... 269s Selecting previously unselected package python-vcr-doc. 269s Preparing to unpack .../058-python-vcr-doc_6.0.2-2_all.deb ... 269s Unpacking python-vcr-doc (6.0.2-2) ... 269s Selecting previously unselected package python3-aiohappyeyeballs. 269s Preparing to unpack .../059-python3-aiohappyeyeballs_2.4.4-2_all.deb ... 269s Unpacking python3-aiohappyeyeballs (2.4.4-2) ... 269s Selecting previously unselected package python3-multidict. 269s Preparing to unpack .../060-python3-multidict_6.1.0-1build1_armhf.deb ... 269s Unpacking python3-multidict (6.1.0-1build1) ... 269s Selecting previously unselected package python3-yarl. 269s Preparing to unpack .../061-python3-yarl_1.13.1-1build1_armhf.deb ... 269s Unpacking python3-yarl (1.13.1-1build1) ... 269s Selecting previously unselected package python3-async-timeout. 269s Preparing to unpack .../062-python3-async-timeout_5.0.1-1_all.deb ... 269s Unpacking python3-async-timeout (5.0.1-1) ... 269s Selecting previously unselected package python3-frozenlist. 269s Preparing to unpack .../063-python3-frozenlist_1.5.0-1build1_armhf.deb ... 269s Unpacking python3-frozenlist (1.5.0-1build1) ... 269s Selecting previously unselected package python3-aiosignal. 269s Preparing to unpack .../064-python3-aiosignal_1.3.2-1_all.deb ... 269s Unpacking python3-aiosignal (1.3.2-1) ... 269s Selecting previously unselected package python3-aiohttp. 269s Preparing to unpack .../065-python3-aiohttp_3.10.11-1_armhf.deb ... 269s Unpacking python3-aiohttp (3.10.11-1) ... 269s Selecting previously unselected package python3.13. 269s Preparing to unpack .../066-python3.13_3.13.1-2_armhf.deb ... 269s Unpacking python3.13 (3.13.1-2) ... 269s Selecting previously unselected package python3-all. 269s Preparing to unpack .../067-python3-all_3.12.8-1_armhf.deb ... 269s Unpacking python3-all (3.12.8-1) ... 269s Selecting previously unselected package python3-dateutil. 269s Preparing to unpack .../068-python3-dateutil_2.9.0-3_all.deb ... 269s Unpacking python3-dateutil (2.9.0-3) ... 269s Selecting previously unselected package python3-jmespath. 269s Preparing to unpack .../069-python3-jmespath_1.0.1-1_all.deb ... 269s Unpacking python3-jmespath (1.0.1-1) ... 269s Selecting previously unselected package python3-six. 269s Preparing to unpack .../070-python3-six_1.17.0-1_all.deb ... 269s Unpacking python3-six (1.17.0-1) ... 269s Selecting previously unselected package python3-botocore. 269s Preparing to unpack .../071-python3-botocore_1.34.46+repack-1ubuntu1_all.deb ... 269s Unpacking python3-botocore (1.34.46+repack-1ubuntu1) ... 270s Selecting previously unselected package python3-s3transfer. 270s Preparing to unpack .../072-python3-s3transfer_0.10.1-1ubuntu2_all.deb ... 270s Unpacking python3-s3transfer (0.10.1-1ubuntu2) ... 270s Selecting previously unselected package python3-boto3. 270s Preparing to unpack .../073-python3-boto3_1.34.46+dfsg-1ubuntu1_all.deb ... 270s Unpacking python3-boto3 (1.34.46+dfsg-1ubuntu1) ... 270s Selecting previously unselected package python3-brotli. 270s Preparing to unpack .../074-python3-brotli_1.1.0-2build3_armhf.deb ... 270s Unpacking python3-brotli (1.1.0-2build3) ... 270s Selecting previously unselected package python3-brotlicffi. 270s Preparing to unpack .../075-python3-brotlicffi_1.1.0.0+ds1-1_armhf.deb ... 270s Unpacking python3-brotlicffi (1.1.0.0+ds1-1) ... 270s Selecting previously unselected package python3-click. 270s Preparing to unpack .../076-python3-click_8.1.8-1_all.deb ... 270s Unpacking python3-click (8.1.8-1) ... 270s Selecting previously unselected package python3-decorator. 270s Preparing to unpack .../077-python3-decorator_5.1.1-5_all.deb ... 270s Unpacking python3-decorator (5.1.1-5) ... 270s Selecting previously unselected package python3-defusedxml. 270s Preparing to unpack .../078-python3-defusedxml_0.7.1-3_all.deb ... 270s Unpacking python3-defusedxml (0.7.1-3) ... 270s Selecting previously unselected package python3-roman. 270s Preparing to unpack .../079-python3-roman_4.2-1_all.deb ... 270s Unpacking python3-roman (4.2-1) ... 270s Selecting previously unselected package python3-docutils. 270s Preparing to unpack .../080-python3-docutils_0.21.2+dfsg-2_all.deb ... 270s Unpacking python3-docutils (0.21.2+dfsg-2) ... 270s Selecting previously unselected package python3-itsdangerous. 270s Preparing to unpack .../081-python3-itsdangerous_2.2.0-1_all.deb ... 270s Unpacking python3-itsdangerous (2.2.0-1) ... 270s Selecting previously unselected package python3-werkzeug. 270s Preparing to unpack .../082-python3-werkzeug_3.1.3-2_all.deb ... 270s Unpacking python3-werkzeug (3.1.3-2) ... 270s Selecting previously unselected package python3-flask. 270s Preparing to unpack .../083-python3-flask_3.1.0-2ubuntu1_all.deb ... 270s Unpacking python3-flask (3.1.0-2ubuntu1) ... 270s Selecting previously unselected package python3-mistune. 271s Preparing to unpack .../084-python3-mistune_3.0.2-2_all.deb ... 271s Unpacking python3-mistune (3.0.2-2) ... 271s Selecting previously unselected package python3-packaging. 271s Preparing to unpack .../085-python3-packaging_24.2-1_all.deb ... 271s Unpacking python3-packaging (24.2-1) ... 271s Selecting previously unselected package python3-flasgger. 271s Preparing to unpack .../086-python3-flasgger_0.9.7.2~dev2+dfsg-3_all.deb ... 271s Unpacking python3-flasgger (0.9.7.2~dev2+dfsg-3) ... 271s Selecting previously unselected package python3-greenlet. 271s Preparing to unpack .../087-python3-greenlet_3.1.0-1_armhf.deb ... 271s Unpacking python3-greenlet (3.1.0-1) ... 271s Selecting previously unselected package python3-httpbin. 271s Preparing to unpack .../088-python3-httpbin_0.10.2+dfsg-2_all.deb ... 271s Unpacking python3-httpbin (0.10.2+dfsg-2) ... 271s Selecting previously unselected package python3-imagesize. 271s Preparing to unpack .../089-python3-imagesize_1.4.1-1_all.deb ... 271s Unpacking python3-imagesize (1.4.1-1) ... 271s Selecting previously unselected package python3-iniconfig. 271s Preparing to unpack .../090-python3-iniconfig_1.1.1-2_all.deb ... 271s Unpacking python3-iniconfig (1.1.1-2) ... 271s Selecting previously unselected package python3-pluggy. 271s Preparing to unpack .../091-python3-pluggy_1.5.0-1_all.deb ... 271s Unpacking python3-pluggy (1.5.0-1) ... 271s Selecting previously unselected package python3-pytest. 271s Preparing to unpack .../092-python3-pytest_8.3.4-1_all.deb ... 271s Unpacking python3-pytest (8.3.4-1) ... 271s Selecting previously unselected package python3-pytest-httpbin. 271s Preparing to unpack .../093-python3-pytest-httpbin_2.1.0-1_all.deb ... 271s Unpacking python3-pytest-httpbin (2.1.0-1) ... 271s Selecting previously unselected package python3-tornado. 271s Preparing to unpack .../094-python3-tornado_6.4.1-3_armhf.deb ... 271s Unpacking python3-tornado (6.4.1-3) ... 271s Selecting previously unselected package python3-pytest-tornado. 271s Preparing to unpack .../095-python3-pytest-tornado_0.8.1-3_all.deb ... 271s Unpacking python3-pytest-tornado (0.8.1-3) ... 271s Selecting previously unselected package python3-snowballstemmer. 271s Preparing to unpack .../096-python3-snowballstemmer_2.2.0-4build1_all.deb ... 271s Unpacking python3-snowballstemmer (2.2.0-4build1) ... 271s Selecting previously unselected package sphinx-common. 271s Preparing to unpack .../097-sphinx-common_8.1.3-3_all.deb ... 271s Unpacking sphinx-common (8.1.3-3) ... 271s Selecting previously unselected package python3-alabaster. 271s Preparing to unpack .../098-python3-alabaster_0.7.16-0.1_all.deb ... 271s Unpacking python3-alabaster (0.7.16-0.1) ... 271s Selecting previously unselected package python3-sphinx. 271s Preparing to unpack .../099-python3-sphinx_8.1.3-3_all.deb ... 271s Unpacking python3-sphinx (8.1.3-3) ... 271s Selecting previously unselected package sphinx-rtd-theme-common. 271s Preparing to unpack .../100-sphinx-rtd-theme-common_3.0.2+dfsg-1_all.deb ... 271s Unpacking sphinx-rtd-theme-common (3.0.2+dfsg-1) ... 271s Selecting previously unselected package python3-sphinxcontrib.jquery. 271s Preparing to unpack .../101-python3-sphinxcontrib.jquery_4.1-5_all.deb ... 271s Unpacking python3-sphinxcontrib.jquery (4.1-5) ... 271s Selecting previously unselected package python3-sphinx-rtd-theme. 271s Preparing to unpack .../102-python3-sphinx-rtd-theme_3.0.2+dfsg-1_all.deb ... 271s Unpacking python3-sphinx-rtd-theme (3.0.2+dfsg-1) ... 272s Selecting previously unselected package python3-wrapt. 272s Preparing to unpack .../103-python3-wrapt_1.15.0-4_armhf.deb ... 272s Unpacking python3-wrapt (1.15.0-4) ... 272s Selecting previously unselected package python3-vcr. 272s Preparing to unpack .../104-python3-vcr_6.0.2-2_all.deb ... 272s Unpacking python3-vcr (6.0.2-2) ... 272s Setting up dh-python (6.20241217) ... 272s Setting up python3-iniconfig (1.1.1-2) ... 272s Setting up python3-tornado (6.4.1-3) ... 273s Setting up python3-brotlicffi (1.1.0.0+ds1-1) ... 273s Setting up fonts-lato (2.015-1) ... 273s Setting up python3-defusedxml (0.7.1-3) ... 273s Setting up libarchive-zip-perl (1.68-1) ... 273s Setting up python3-alabaster (0.7.16-0.1) ... 273s Setting up libdebhelper-perl (13.20ubuntu1) ... 273s Setting up linux-libc-dev:armhf (6.11.0-8.8) ... 273s Setting up m4 (1.4.19-4build1) ... 273s Setting up python3-itsdangerous (2.2.0-1) ... 273s Setting up libgomp1:armhf (14.2.0-13ubuntu1) ... 273s Setting up python3-click (8.1.8-1) ... 274s Setting up python3-multidict (6.1.0-1build1) ... 274s Setting up python3-frozenlist (1.5.0-1build1) ... 274s Setting up python3-aiosignal (1.3.2-1) ... 274s Setting up python3-async-timeout (5.0.1-1) ... 274s Setting up python3-six (1.17.0-1) ... 275s Setting up libpython3.13-minimal:armhf (3.13.1-2) ... 275s Setting up python3-roman (4.2-1) ... 275s Setting up python3-decorator (5.1.1-5) ... 275s Setting up autotools-dev (20220109.1) ... 275s Setting up python3-packaging (24.2-1) ... 275s Setting up rpcsvc-proto (1.4.2-0ubuntu7) ... 275s Setting up python3-snowballstemmer (2.2.0-4build1) ... 276s Setting up python3-werkzeug (3.1.3-2) ... 276s Setting up python3-jmespath (1.0.1-1) ... 276s Setting up python3-brotli (1.1.0-2build3) ... 277s Setting up python3-greenlet (3.1.0-1) ... 277s Setting up libmpc3:armhf (1.3.1-1build2) ... 277s Setting up python3-wrapt (1.15.0-4) ... 277s Setting up autopoint (0.22.5-3) ... 277s Setting up python3-aiohappyeyeballs (2.4.4-2) ... 277s Setting up autoconf (2.72-3) ... 277s Setting up python3-pluggy (1.5.0-1) ... 277s Setting up libubsan1:armhf (14.2.0-13ubuntu1) ... 277s Setting up dwz (0.15-1build6) ... 277s Setting up libcrypt-dev:armhf (1:4.4.36-5) ... 277s Setting up libasan8:armhf (14.2.0-13ubuntu1) ... 277s Setting up docutils-common (0.21.2+dfsg-2) ... 277s Setting up libjson-perl (4.10000-1) ... 277s Setting up debugedit (1:5.1-1) ... 277s Setting up liblua5.4-0:armhf (5.4.7-1) ... 277s Setting up python3.13-minimal (3.13.1-2) ... 278s Setting up python3-dateutil (2.9.0-3) ... 279s Setting up pandoc-data (3.1.11.1-3build1) ... 279s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 279s Setting up libgcc-14-dev:armhf (14.2.0-13ubuntu1) ... 279s Setting up libisl23:armhf (0.27-1) ... 279s Setting up libc-dev-bin (2.40-4ubuntu1) ... 279s Setting up python3-yarl (1.13.1-1build1) ... 279s Setting up python3-mistune (3.0.2-2) ... 279s Setting up libpython3.13-stdlib:armhf (3.13.1-2) ... 279s Setting up fonts-font-awesome (5.0.10+really4.7.0~dfsg-4.1) ... 279s Setting up sphinx-rtd-theme-common (3.0.2+dfsg-1) ... 279s Setting up libcc1-0:armhf (14.2.0-13ubuntu1) ... 279s Setting up cpp-14-arm-linux-gnueabihf (14.2.0-13ubuntu1) ... 279s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 279s Setting up python3-imagesize (1.4.1-1) ... 279s Setting up automake (1:1.16.5-1.3ubuntu1) ... 279s update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode 279s Setting up libfile-stripnondeterminism-perl (1.14.0-1) ... 279s Setting up gettext (0.22.5-3) ... 279s Setting up python3.13 (3.13.1-2) ... 280s Setting up python3-pytest (8.3.4-1) ... 281s Setting up python3-flask (3.1.0-2ubuntu1) ... 281s Setting up python3-aiohttp (3.10.11-1) ... 282s Setting up gcc-14-arm-linux-gnueabihf (14.2.0-13ubuntu1) ... 282s Setting up python3-all (3.12.8-1) ... 282s Setting up intltool-debian (0.35.0+20060710.6) ... 282s Setting up pandoc (3.1.11.1+ds-2) ... 282s Setting up python3-pytest-tornado (0.8.1-3) ... 282s Setting up python3-botocore (1.34.46+repack-1ubuntu1) ... 283s Setting up python3-vcr (6.0.2-2) ... 283s Setting up libjs-sphinxdoc (8.1.3-3) ... 283s Setting up cpp-14 (14.2.0-13ubuntu1) ... 283s Setting up dh-strip-nondeterminism (1.14.0-1) ... 283s Setting up libc6-dev:armhf (2.40-4ubuntu1) ... 283s Setting up libstdc++-14-dev:armhf (14.2.0-13ubuntu1) ... 283s Setting up cpp-arm-linux-gnueabihf (4:14.1.0-2ubuntu1) ... 283s Setting up gcc-arm-linux-gnueabihf (4:14.1.0-2ubuntu1) ... 283s Setting up python-vcr-doc (6.0.2-2) ... 283s Setting up g++-14-arm-linux-gnueabihf (14.2.0-13ubuntu1) ... 283s Setting up python3-flasgger (0.9.7.2~dev2+dfsg-3) ... 283s Setting up po-debconf (1.0.21+nmu1) ... 283s Setting up python3-s3transfer (0.10.1-1ubuntu2) ... 283s Setting up gcc-14 (14.2.0-13ubuntu1) ... 283s Setting up sphinx-common (8.1.3-3) ... 283s Setting up python3-boto3 (1.34.46+dfsg-1ubuntu1) ... 284s Setting up python3-httpbin (0.10.2+dfsg-2) ... 284s Setting up cpp (4:14.1.0-2ubuntu1) ... 284s Setting up python3-pytest-httpbin (2.1.0-1) ... 284s Setting up g++-14 (14.2.0-13ubuntu1) ... 284s Setting up g++-arm-linux-gnueabihf (4:14.1.0-2ubuntu1) ... 284s Setting up libtool (2.4.7-8) ... 284s Setting up gcc (4:14.1.0-2ubuntu1) ... 284s Setting up dh-autoreconf (20) ... 284s Setting up g++ (4:14.1.0-2ubuntu1) ... 284s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 284s Setting up build-essential (12.10ubuntu1) ... 284s Setting up debhelper (13.20ubuntu1) ... 284s Setting up pybuild-plugin-autopkgtest (6.20241217) ... 284s Processing triggers for install-info (7.1.1-1) ... 284s Processing triggers for libc-bin (2.40-4ubuntu1) ... 284s Processing triggers for systemd (257-2ubuntu1) ... 284s Processing triggers for man-db (2.13.0-1) ... 285s Processing triggers for sgml-base (1.31) ... 285s Setting up python3-docutils (0.21.2+dfsg-2) ... 286s Setting up python3-sphinx (8.1.3-3) ... 288s Setting up python3-sphinxcontrib.jquery (4.1-5) ... 288s Setting up python3-sphinx-rtd-theme (3.0.2+dfsg-1) ... 298s autopkgtest [02:35:01]: test pybuild-autopkgtest: pybuild-autopkgtest 298s autopkgtest [02:35:01]: test pybuild-autopkgtest: [----------------------- 300s pybuild-autopkgtest 300s I: pybuild base:311: cd /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build; python3.13 -m pytest --ignore tests/integration/test_aiohttp.py --ignore tests/integration/test_tornado.py --ignore tests/integration/test_requests.py -m "not online" -k "not test_basic_json_use and not test_load_cassette_with_custom_persister" 303s ============================= test session starts ============================== 303s platform linux -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0 303s rootdir: /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build 303s plugins: typeguard-4.4.1, httpbin-2.1.0, tornado-0.8.1 303s collected 305 items / 19 deselected / 1 skipped / 286 selected 303s 303s tests/integration/test_basic.py .... [ 1%] 303s tests/integration/test_boto3.py ss [ 2%] 303s tests/integration/test_config.py . [ 2%] 303s tests/integration/test_filter.py .......... [ 5%] 303s tests/integration/test_httplib2.py ........ [ 8%] 303s tests/integration/test_urllib2.py ........ [ 11%] 303s tests/integration/test_urllib3.py FFFFFFF [ 13%] 304s tests/integration/test_httplib2.py ........ [ 16%] 304s tests/integration/test_urllib2.py ........ [ 19%] 304s tests/integration/test_urllib3.py FFFFFFF [ 22%] 304s tests/integration/test_httplib2.py . [ 22%] 304s tests/integration/test_ignore.py .... [ 23%] 304s tests/integration/test_matchers.py .............. [ 28%] 304s tests/integration/test_multiple.py . [ 29%] 305s tests/integration/test_proxy.py F [ 29%] 305s tests/integration/test_record_mode.py ........ [ 32%] 305s tests/integration/test_register_persister.py .. [ 32%] 305s tests/integration/test_register_serializer.py . [ 33%] 305s tests/integration/test_request.py .. [ 33%] 305s tests/integration/test_stubs.py .... [ 35%] 305s tests/integration/test_urllib2.py . [ 35%] 305s tests/integration/test_urllib3.py FF. [ 36%] 305s tests/integration/test_wild.py F.F. [ 38%] 305s tests/unit/test_cassettes.py ............................... [ 48%] 305s tests/unit/test_errors.py .... [ 50%] 305s tests/unit/test_filters.py ........................ [ 58%] 305s tests/unit/test_json_serializer.py . [ 59%] 305s tests/unit/test_matchers.py ............................ [ 68%] 305s tests/unit/test_migration.py ... [ 69%] 305s tests/unit/test_persist.py .... [ 71%] 305s tests/unit/test_request.py ................. [ 77%] 305s tests/unit/test_response.py .... [ 78%] 305s tests/unit/test_serialize.py ............... [ 83%] 305s tests/unit/test_stubs.py ... [ 84%] 305s tests/unit/test_unittest.py ....... [ 87%] 305s tests/unit/test_util.py ........... [ 91%] 305s tests/unit/test_vcr.py ........................ [ 99%] 306s tests/unit/test_vcr_import.py . [100%] 306s 306s =================================== FAILURES =================================== 306s ____________________________ test_status_code[http] ____________________________ 306s 306s httpbin_both = 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_status_code_http_0') 306s verify_pool_mgr = 306s 306s def test_status_code(httpbin_both, tmpdir, verify_pool_mgr): 306s """Ensure that we can read the status code""" 306s url = httpbin_both.url 306s with vcr.use_cassette(str(tmpdir.join("atts.yaml"))): 306s > status_code = verify_pool_mgr.request("GET", url).status 306s 306s tests/integration/test_urllib3.py:34: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/', body = None, headers = {} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:06] "GET / HTTP/1.1" 200 9358 306s ______________________________ test_headers[http] ______________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_headers_http_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_headers(tmpdir, httpbin_both, verify_pool_mgr): 306s """Ensure that we can read the headers back""" 306s url = httpbin_both.url 306s with vcr.use_cassette(str(tmpdir.join("headers.yaml"))): 306s > headers = verify_pool_mgr.request("GET", url).headers 306s 306s tests/integration/test_urllib3.py:44: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/', body = None, headers = {} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:06] "GET / HTTP/1.1" 200 9358 306s _______________________________ test_body[http] ________________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_body_http_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_body(tmpdir, httpbin_both, verify_pool_mgr): 306s """Ensure the responses are all identical enough""" 306s url = httpbin_both.url + "/bytes/1024" 306s with vcr.use_cassette(str(tmpdir.join("body.yaml"))): 306s > content = verify_pool_mgr.request("GET", url).data 306s 306s tests/integration/test_urllib3.py:55: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/bytes/1024', body = None, headers = {} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:06] "GET /bytes/1024 HTTP/1.1" 200 1024 306s _______________________________ test_auth[http] ________________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_auth_http_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_auth(tmpdir, httpbin_both, verify_pool_mgr): 306s """Ensure that we can handle basic auth""" 306s auth = ("user", "passwd") 306s headers = urllib3.util.make_headers(basic_auth="{}:{}".format(*auth)) 306s url = httpbin_both.url + "/basic-auth/user/passwd" 306s with vcr.use_cassette(str(tmpdir.join("auth.yaml"))): 306s > one = verify_pool_mgr.request("GET", url, headers=headers) 306s 306s tests/integration/test_urllib3.py:67: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/basic-auth/user/passwd', body = None 306s headers = {'authorization': 'Basic dXNlcjpwYXNzd2Q='} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:06] "GET /basic-auth/user/passwd HTTP/1.1" 200 46 306s ____________________________ test_auth_failed[http] ____________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_auth_failed_http_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_auth_failed(tmpdir, httpbin_both, verify_pool_mgr): 306s """Ensure that we can save failed auth statuses""" 306s auth = ("user", "wrongwrongwrong") 306s headers = urllib3.util.make_headers(basic_auth="{}:{}".format(*auth)) 306s url = httpbin_both.url + "/basic-auth/user/passwd" 306s with vcr.use_cassette(str(tmpdir.join("auth-failed.yaml"))) as cass: 306s # Ensure that this is empty to begin with 306s assert_cassette_empty(cass) 306s > one = verify_pool_mgr.request("GET", url, headers=headers) 306s 306s tests/integration/test_urllib3.py:83: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/basic-auth/user/passwd', body = None 306s headers = {'authorization': 'Basic dXNlcjp3cm9uZ3dyb25nd3Jvbmc='} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:06] "GET /basic-auth/user/passwd HTTP/1.1" 401 0 306s _______________________________ test_post[http] ________________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_post_http_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_post(tmpdir, httpbin_both, verify_pool_mgr): 306s """Ensure that we can post and cache the results""" 306s data = {"key1": "value1", "key2": "value2"} 306s url = httpbin_both.url + "/post" 306s with vcr.use_cassette(str(tmpdir.join("verify_pool_mgr.yaml"))): 306s > req1 = verify_pool_mgr.request("POST", url, data).data 306s 306s tests/integration/test_urllib3.py:94: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:143: in request 306s return self.request_encode_body( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:278: in request_encode_body 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'POST', url = '/post', body = {'key1': 'value1', 'key2': 'value2'} 306s headers = HTTPHeaderDict({}) 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:06] "POST /post HTTP/1.1" 501 159 306s _______________________________ test_gzip[http] ________________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_gzip_http_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_gzip(tmpdir, httpbin_both, verify_pool_mgr): 306s """ 306s Ensure that requests (actually urllib3) is able to automatically decompress 306s the response body 306s """ 306s url = httpbin_both.url + "/gzip" 306s response = verify_pool_mgr.request("GET", url) 306s 306s with vcr.use_cassette(str(tmpdir.join("gzip.yaml"))): 306s > response = verify_pool_mgr.request("GET", url) 306s 306s tests/integration/test_urllib3.py:140: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/gzip', body = None, headers = {} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:06] "GET /gzip HTTP/1.1" 200 165 306s 127.0.0.1 - - [18/Jan/2025 02:35:06] "GET /gzip HTTP/1.1" 200 165 306s ___________________________ test_status_code[https] ____________________________ 306s 306s httpbin_both = 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_status_code_https_0') 306s verify_pool_mgr = 306s 306s def test_status_code(httpbin_both, tmpdir, verify_pool_mgr): 306s """Ensure that we can read the status code""" 306s url = httpbin_both.url 306s with vcr.use_cassette(str(tmpdir.join("atts.yaml"))): 306s > status_code = verify_pool_mgr.request("GET", url).status 306s 306s tests/integration/test_urllib3.py:34: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/', body = None, headers = {} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:07] "GET / HTTP/1.1" 200 9358 306s _____________________________ test_headers[https] ______________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_headers_https_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_headers(tmpdir, httpbin_both, verify_pool_mgr): 306s """Ensure that we can read the headers back""" 306s url = httpbin_both.url 306s with vcr.use_cassette(str(tmpdir.join("headers.yaml"))): 306s > headers = verify_pool_mgr.request("GET", url).headers 306s 306s tests/integration/test_urllib3.py:44: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/', body = None, headers = {} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:07] "GET / HTTP/1.1" 200 9358 306s _______________________________ test_body[https] _______________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_body_https_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_body(tmpdir, httpbin_both, verify_pool_mgr): 306s """Ensure the responses are all identical enough""" 306s url = httpbin_both.url + "/bytes/1024" 306s with vcr.use_cassette(str(tmpdir.join("body.yaml"))): 306s > content = verify_pool_mgr.request("GET", url).data 306s 306s tests/integration/test_urllib3.py:55: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/bytes/1024', body = None, headers = {} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:07] "GET /bytes/1024 HTTP/1.1" 200 1024 306s _______________________________ test_auth[https] _______________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_auth_https_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_auth(tmpdir, httpbin_both, verify_pool_mgr): 306s """Ensure that we can handle basic auth""" 306s auth = ("user", "passwd") 306s headers = urllib3.util.make_headers(basic_auth="{}:{}".format(*auth)) 306s url = httpbin_both.url + "/basic-auth/user/passwd" 306s with vcr.use_cassette(str(tmpdir.join("auth.yaml"))): 306s > one = verify_pool_mgr.request("GET", url, headers=headers) 306s 306s tests/integration/test_urllib3.py:67: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/basic-auth/user/passwd', body = None 306s headers = {'authorization': 'Basic dXNlcjpwYXNzd2Q='} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 306s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 306s chunked: bool = False, 306s response_conn: BaseHTTPConnection | None = None, 306s preload_content: bool = True, 306s decode_content: bool = True, 306s enforce_content_length: bool = True, 306s ) -> BaseHTTPResponse: 306s """ 306s Perform a request on a given urllib connection object taken from our 306s pool. 306s 306s :param conn: 306s a connection from one of our connection pools 306s 306s :param method: 306s HTTP request method (such as GET, POST, PUT, etc.) 306s 306s :param url: 306s The URL to perform the request on. 306s 306s :param body: 306s Data to send in the request body, either :class:`str`, :class:`bytes`, 306s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 306s 306s :param headers: 306s Dictionary of custom headers to send, such as User-Agent, 306s If-None-Match, etc. If None, pool headers are used. If provided, 306s these headers completely replace any pool-specific headers. 306s 306s :param retries: 306s Configure the number of retries to allow before raising a 306s :class:`~urllib3.exceptions.MaxRetryError` exception. 306s 306s Pass ``None`` to retry until you receive a response. Pass a 306s :class:`~urllib3.util.retry.Retry` object for fine-grained control 306s over different types of retries. 306s Pass an integer number to retry connection errors that many times, 306s but no other types of errors. Pass zero to never retry. 306s 306s If ``False``, then retries are disabled and any exception is raised 306s immediately. Also, instead of raising a MaxRetryError on redirects, 306s the redirect response will be returned. 306s 306s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 306s 306s :param timeout: 306s If specified, overrides the default timeout for this one 306s request. It may be a float (in seconds) or an instance of 306s :class:`urllib3.util.Timeout`. 306s 306s :param chunked: 306s If True, urllib3 will send the body using chunked transfer 306s encoding. Otherwise, urllib3 will send the body using the standard 306s content-length form. Defaults to False. 306s 306s :param response_conn: 306s Set this to ``None`` if you will handle releasing the connection or 306s set the connection to have the response release it. 306s 306s :param preload_content: 306s If True, the response's body will be preloaded during construction. 306s 306s :param decode_content: 306s If True, will attempt to decode the body based on the 306s 'content-encoding' header. 306s 306s :param enforce_content_length: 306s Enforce content length checking. Body returned by server must match 306s value of Content-Length header, if present. Otherwise, raise error. 306s """ 306s self.num_requests += 1 306s 306s timeout_obj = self._get_timeout(timeout) 306s timeout_obj.start_connect() 306s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 306s 306s try: 306s # Trigger any extra validation we need to do. 306s try: 306s self._validate_conn(conn) 306s except (SocketTimeout, BaseSSLError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 306s raise 306s 306s # _validate_conn() starts the connection to an HTTPS proxy 306s # so we need to wrap errors with 'ProxyError' here too. 306s except ( 306s OSError, 306s NewConnectionError, 306s TimeoutError, 306s BaseSSLError, 306s CertificateError, 306s SSLError, 306s ) as e: 306s new_e: Exception = e 306s if isinstance(e, (BaseSSLError, CertificateError)): 306s new_e = SSLError(e) 306s # If the connection didn't successfully connect to it's proxy 306s # then there 306s if isinstance( 306s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 306s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 306s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 306s raise new_e 306s 306s # conn.request() calls http.client.*.request, not the method in 306s # urllib3.request. It also calls makefile (recv) on the socket. 306s try: 306s conn.request( 306s method, 306s url, 306s body=body, 306s headers=headers, 306s chunked=chunked, 306s preload_content=preload_content, 306s decode_content=decode_content, 306s enforce_content_length=enforce_content_length, 306s ) 306s 306s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 306s # legitimately able to close the connection after sending a valid response. 306s # With this behaviour, the received response is still readable. 306s except BrokenPipeError: 306s pass 306s except OSError as e: 306s # MacOS/Linux 306s # EPROTOTYPE and ECONNRESET are needed on macOS 306s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 306s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 306s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 306s raise 306s 306s # Reset the timeout for the recv() on the socket 306s read_timeout = timeout_obj.read_timeout 306s 306s if not conn.is_closed: 306s # In Python 3 socket.py will catch EAGAIN and return None when you 306s # try and read into the file pointer created by http.client, which 306s # instead raises a BadStatusLine exception. Instead of catching 306s # the exception and assuming all BadStatusLine exceptions are read 306s # timeouts, check for a zero timeout before making the request. 306s if read_timeout == 0: 306s raise ReadTimeoutError( 306s self, url, f"Read timed out. (read timeout={read_timeout})" 306s ) 306s conn.timeout = read_timeout 306s 306s # Receive the response from the server 306s try: 306s response = conn.getresponse() 306s except (BaseSSLError, OSError) as e: 306s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 306s raise 306s 306s # Set properties that are used by the pooling layer. 306s response.retries = retries 306s response._connection = response_conn # type: ignore[attr-defined] 306s response._pool = self # type: ignore[attr-defined] 306s 306s log.debug( 306s '%s://%s:%s "%s %s %s" %s %s', 306s self.scheme, 306s self.host, 306s self.port, 306s method, 306s url, 306s > response.version_string, 306s response.status, 306s response.length_remaining, 306s ) 306s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 306s 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 306s ----------------------------- Captured stderr call ----------------------------- 306s 127.0.0.1 - - [18/Jan/2025 02:35:07] "GET /basic-auth/user/passwd HTTP/1.1" 200 46 306s ___________________________ test_auth_failed[https] ____________________________ 306s 306s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_auth_failed_https_0') 306s httpbin_both = 306s verify_pool_mgr = 306s 306s def test_auth_failed(tmpdir, httpbin_both, verify_pool_mgr): 306s """Ensure that we can save failed auth statuses""" 306s auth = ("user", "wrongwrongwrong") 306s headers = urllib3.util.make_headers(basic_auth="{}:{}".format(*auth)) 306s url = httpbin_both.url + "/basic-auth/user/passwd" 306s with vcr.use_cassette(str(tmpdir.join("auth-failed.yaml"))) as cass: 306s # Ensure that this is empty to begin with 306s assert_cassette_empty(cass) 306s > one = verify_pool_mgr.request("GET", url, headers=headers) 306s 306s tests/integration/test_urllib3.py:83: 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 306s return self.request_encode_url( 306s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 306s return self.urlopen(method, url, **extra_kw) 306s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 306s response = conn.urlopen(method, u.request_uri, **kw) 306s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 306s response = self._make_request( 306s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 306s 306s self = 306s conn = 306s method = 'GET', url = '/basic-auth/user/passwd', body = None 306s headers = {'authorization': 'Basic dXNlcjp3cm9uZ3dyb25nd3Jvbmc='} 306s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 306s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 306s chunked = False, response_conn = None, preload_content = True 306s decode_content = True, enforce_content_length = True 306s 306s def _make_request( 306s self, 306s conn: BaseHTTPConnection, 306s method: str, 306s url: str, 306s body: _TYPE_BODY | None = None, 306s headers: typing.Mapping[str, str] | None = None, 306s retries: Retry | None = None, 307s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 307s chunked: bool = False, 307s response_conn: BaseHTTPConnection | None = None, 307s preload_content: bool = True, 307s decode_content: bool = True, 307s enforce_content_length: bool = True, 307s ) -> BaseHTTPResponse: 307s """ 307s Perform a request on a given urllib connection object taken from our 307s pool. 307s 307s :param conn: 307s a connection from one of our connection pools 307s 307s :param method: 307s HTTP request method (such as GET, POST, PUT, etc.) 307s 307s :param url: 307s The URL to perform the request on. 307s 307s :param body: 307s Data to send in the request body, either :class:`str`, :class:`bytes`, 307s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 307s 307s :param headers: 307s Dictionary of custom headers to send, such as User-Agent, 307s If-None-Match, etc. If None, pool headers are used. If provided, 307s these headers completely replace any pool-specific headers. 307s 307s :param retries: 307s Configure the number of retries to allow before raising a 307s :class:`~urllib3.exceptions.MaxRetryError` exception. 307s 307s Pass ``None`` to retry until you receive a response. Pass a 307s :class:`~urllib3.util.retry.Retry` object for fine-grained control 307s over different types of retries. 307s Pass an integer number to retry connection errors that many times, 307s but no other types of errors. Pass zero to never retry. 307s 307s If ``False``, then retries are disabled and any exception is raised 307s immediately. Also, instead of raising a MaxRetryError on redirects, 307s the redirect response will be returned. 307s 307s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 307s 307s :param timeout: 307s If specified, overrides the default timeout for this one 307s request. It may be a float (in seconds) or an instance of 307s :class:`urllib3.util.Timeout`. 307s 307s :param chunked: 307s If True, urllib3 will send the body using chunked transfer 307s encoding. Otherwise, urllib3 will send the body using the standard 307s content-length form. Defaults to False. 307s 307s :param response_conn: 307s Set this to ``None`` if you will handle releasing the connection or 307s set the connection to have the response release it. 307s 307s :param preload_content: 307s If True, the response's body will be preloaded during construction. 307s 307s :param decode_content: 307s If True, will attempt to decode the body based on the 307s 'content-encoding' header. 307s 307s :param enforce_content_length: 307s Enforce content length checking. Body returned by server must match 307s value of Content-Length header, if present. Otherwise, raise error. 307s """ 307s self.num_requests += 1 307s 307s timeout_obj = self._get_timeout(timeout) 307s timeout_obj.start_connect() 307s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 307s 307s try: 307s # Trigger any extra validation we need to do. 307s try: 307s self._validate_conn(conn) 307s except (SocketTimeout, BaseSSLError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 307s raise 307s 307s # _validate_conn() starts the connection to an HTTPS proxy 307s # so we need to wrap errors with 'ProxyError' here too. 307s except ( 307s OSError, 307s NewConnectionError, 307s TimeoutError, 307s BaseSSLError, 307s CertificateError, 307s SSLError, 307s ) as e: 307s new_e: Exception = e 307s if isinstance(e, (BaseSSLError, CertificateError)): 307s new_e = SSLError(e) 307s # If the connection didn't successfully connect to it's proxy 307s # then there 307s if isinstance( 307s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 307s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 307s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 307s raise new_e 307s 307s # conn.request() calls http.client.*.request, not the method in 307s # urllib3.request. It also calls makefile (recv) on the socket. 307s try: 307s conn.request( 307s method, 307s url, 307s body=body, 307s headers=headers, 307s chunked=chunked, 307s preload_content=preload_content, 307s decode_content=decode_content, 307s enforce_content_length=enforce_content_length, 307s ) 307s 307s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 307s # legitimately able to close the connection after sending a valid response. 307s # With this behaviour, the received response is still readable. 307s except BrokenPipeError: 307s pass 307s except OSError as e: 307s # MacOS/Linux 307s # EPROTOTYPE and ECONNRESET are needed on macOS 307s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 307s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 307s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 307s raise 307s 307s # Reset the timeout for the recv() on the socket 307s read_timeout = timeout_obj.read_timeout 307s 307s if not conn.is_closed: 307s # In Python 3 socket.py will catch EAGAIN and return None when you 307s # try and read into the file pointer created by http.client, which 307s # instead raises a BadStatusLine exception. Instead of catching 307s # the exception and assuming all BadStatusLine exceptions are read 307s # timeouts, check for a zero timeout before making the request. 307s if read_timeout == 0: 307s raise ReadTimeoutError( 307s self, url, f"Read timed out. (read timeout={read_timeout})" 307s ) 307s conn.timeout = read_timeout 307s 307s # Receive the response from the server 307s try: 307s response = conn.getresponse() 307s except (BaseSSLError, OSError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 307s raise 307s 307s # Set properties that are used by the pooling layer. 307s response.retries = retries 307s response._connection = response_conn # type: ignore[attr-defined] 307s response._pool = self # type: ignore[attr-defined] 307s 307s log.debug( 307s '%s://%s:%s "%s %s %s" %s %s', 307s self.scheme, 307s self.host, 307s self.port, 307s method, 307s url, 307s > response.version_string, 307s response.status, 307s response.length_remaining, 307s ) 307s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 307s 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 307s ----------------------------- Captured stderr call ----------------------------- 307s 127.0.0.1 - - [18/Jan/2025 02:35:07] "GET /basic-auth/user/passwd HTTP/1.1" 401 0 307s _______________________________ test_post[https] _______________________________ 307s 307s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_post_https_0') 307s httpbin_both = 307s verify_pool_mgr = 307s 307s def test_post(tmpdir, httpbin_both, verify_pool_mgr): 307s """Ensure that we can post and cache the results""" 307s data = {"key1": "value1", "key2": "value2"} 307s url = httpbin_both.url + "/post" 307s with vcr.use_cassette(str(tmpdir.join("verify_pool_mgr.yaml"))): 307s > req1 = verify_pool_mgr.request("POST", url, data).data 307s 307s tests/integration/test_urllib3.py:94: 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:143: in request 307s return self.request_encode_body( 307s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:278: in request_encode_body 307s return self.urlopen(method, url, **extra_kw) 307s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 307s response = conn.urlopen(method, u.request_uri, **kw) 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 307s response = self._make_request( 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s 307s self = 307s conn = 307s method = 'POST', url = '/post', body = {'key1': 'value1', 'key2': 'value2'} 307s headers = HTTPHeaderDict({}) 307s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 307s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 307s chunked = False, response_conn = None, preload_content = True 307s decode_content = True, enforce_content_length = True 307s 307s def _make_request( 307s self, 307s conn: BaseHTTPConnection, 307s method: str, 307s url: str, 307s body: _TYPE_BODY | None = None, 307s headers: typing.Mapping[str, str] | None = None, 307s retries: Retry | None = None, 307s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 307s chunked: bool = False, 307s response_conn: BaseHTTPConnection | None = None, 307s preload_content: bool = True, 307s decode_content: bool = True, 307s enforce_content_length: bool = True, 307s ) -> BaseHTTPResponse: 307s """ 307s Perform a request on a given urllib connection object taken from our 307s pool. 307s 307s :param conn: 307s a connection from one of our connection pools 307s 307s :param method: 307s HTTP request method (such as GET, POST, PUT, etc.) 307s 307s :param url: 307s The URL to perform the request on. 307s 307s :param body: 307s Data to send in the request body, either :class:`str`, :class:`bytes`, 307s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 307s 307s :param headers: 307s Dictionary of custom headers to send, such as User-Agent, 307s If-None-Match, etc. If None, pool headers are used. If provided, 307s these headers completely replace any pool-specific headers. 307s 307s :param retries: 307s Configure the number of retries to allow before raising a 307s :class:`~urllib3.exceptions.MaxRetryError` exception. 307s 307s Pass ``None`` to retry until you receive a response. Pass a 307s :class:`~urllib3.util.retry.Retry` object for fine-grained control 307s over different types of retries. 307s Pass an integer number to retry connection errors that many times, 307s but no other types of errors. Pass zero to never retry. 307s 307s If ``False``, then retries are disabled and any exception is raised 307s immediately. Also, instead of raising a MaxRetryError on redirects, 307s the redirect response will be returned. 307s 307s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 307s 307s :param timeout: 307s If specified, overrides the default timeout for this one 307s request. It may be a float (in seconds) or an instance of 307s :class:`urllib3.util.Timeout`. 307s 307s :param chunked: 307s If True, urllib3 will send the body using chunked transfer 307s encoding. Otherwise, urllib3 will send the body using the standard 307s content-length form. Defaults to False. 307s 307s :param response_conn: 307s Set this to ``None`` if you will handle releasing the connection or 307s set the connection to have the response release it. 307s 307s :param preload_content: 307s If True, the response's body will be preloaded during construction. 307s 307s :param decode_content: 307s If True, will attempt to decode the body based on the 307s 'content-encoding' header. 307s 307s :param enforce_content_length: 307s Enforce content length checking. Body returned by server must match 307s value of Content-Length header, if present. Otherwise, raise error. 307s """ 307s self.num_requests += 1 307s 307s timeout_obj = self._get_timeout(timeout) 307s timeout_obj.start_connect() 307s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 307s 307s try: 307s # Trigger any extra validation we need to do. 307s try: 307s self._validate_conn(conn) 307s except (SocketTimeout, BaseSSLError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 307s raise 307s 307s # _validate_conn() starts the connection to an HTTPS proxy 307s # so we need to wrap errors with 'ProxyError' here too. 307s except ( 307s OSError, 307s NewConnectionError, 307s TimeoutError, 307s BaseSSLError, 307s CertificateError, 307s SSLError, 307s ) as e: 307s new_e: Exception = e 307s if isinstance(e, (BaseSSLError, CertificateError)): 307s new_e = SSLError(e) 307s # If the connection didn't successfully connect to it's proxy 307s # then there 307s if isinstance( 307s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 307s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 307s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 307s raise new_e 307s 307s # conn.request() calls http.client.*.request, not the method in 307s # urllib3.request. It also calls makefile (recv) on the socket. 307s try: 307s conn.request( 307s method, 307s url, 307s body=body, 307s headers=headers, 307s chunked=chunked, 307s preload_content=preload_content, 307s decode_content=decode_content, 307s enforce_content_length=enforce_content_length, 307s ) 307s 307s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 307s # legitimately able to close the connection after sending a valid response. 307s # With this behaviour, the received response is still readable. 307s except BrokenPipeError: 307s pass 307s except OSError as e: 307s # MacOS/Linux 307s # EPROTOTYPE and ECONNRESET are needed on macOS 307s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 307s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 307s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 307s raise 307s 307s # Reset the timeout for the recv() on the socket 307s read_timeout = timeout_obj.read_timeout 307s 307s if not conn.is_closed: 307s # In Python 3 socket.py will catch EAGAIN and return None when you 307s # try and read into the file pointer created by http.client, which 307s # instead raises a BadStatusLine exception. Instead of catching 307s # the exception and assuming all BadStatusLine exceptions are read 307s # timeouts, check for a zero timeout before making the request. 307s if read_timeout == 0: 307s raise ReadTimeoutError( 307s self, url, f"Read timed out. (read timeout={read_timeout})" 307s ) 307s conn.timeout = read_timeout 307s 307s # Receive the response from the server 307s try: 307s response = conn.getresponse() 307s except (BaseSSLError, OSError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 307s raise 307s 307s # Set properties that are used by the pooling layer. 307s response.retries = retries 307s response._connection = response_conn # type: ignore[attr-defined] 307s response._pool = self # type: ignore[attr-defined] 307s 307s log.debug( 307s '%s://%s:%s "%s %s %s" %s %s', 307s self.scheme, 307s self.host, 307s self.port, 307s method, 307s url, 307s > response.version_string, 307s response.status, 307s response.length_remaining, 307s ) 307s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 307s 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 307s ----------------------------- Captured stderr call ----------------------------- 307s 127.0.0.1 - - [18/Jan/2025 02:35:07] "POST /post HTTP/1.1" 501 159 307s _______________________________ test_gzip[https] _______________________________ 307s 307s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_gzip_https_0') 307s httpbin_both = 307s verify_pool_mgr = 307s 307s def test_gzip(tmpdir, httpbin_both, verify_pool_mgr): 307s """ 307s Ensure that requests (actually urllib3) is able to automatically decompress 307s the response body 307s """ 307s url = httpbin_both.url + "/gzip" 307s response = verify_pool_mgr.request("GET", url) 307s 307s with vcr.use_cassette(str(tmpdir.join("gzip.yaml"))): 307s > response = verify_pool_mgr.request("GET", url) 307s 307s tests/integration/test_urllib3.py:140: 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 307s return self.request_encode_url( 307s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 307s return self.urlopen(method, url, **extra_kw) 307s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 307s response = conn.urlopen(method, u.request_uri, **kw) 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 307s response = self._make_request( 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s 307s self = 307s conn = 307s method = 'GET', url = '/gzip', body = None, headers = {} 307s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 307s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 307s chunked = False, response_conn = None, preload_content = True 307s decode_content = True, enforce_content_length = True 307s 307s def _make_request( 307s self, 307s conn: BaseHTTPConnection, 307s method: str, 307s url: str, 307s body: _TYPE_BODY | None = None, 307s headers: typing.Mapping[str, str] | None = None, 307s retries: Retry | None = None, 307s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 307s chunked: bool = False, 307s response_conn: BaseHTTPConnection | None = None, 307s preload_content: bool = True, 307s decode_content: bool = True, 307s enforce_content_length: bool = True, 307s ) -> BaseHTTPResponse: 307s """ 307s Perform a request on a given urllib connection object taken from our 307s pool. 307s 307s :param conn: 307s a connection from one of our connection pools 307s 307s :param method: 307s HTTP request method (such as GET, POST, PUT, etc.) 307s 307s :param url: 307s The URL to perform the request on. 307s 307s :param body: 307s Data to send in the request body, either :class:`str`, :class:`bytes`, 307s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 307s 307s :param headers: 307s Dictionary of custom headers to send, such as User-Agent, 307s If-None-Match, etc. If None, pool headers are used. If provided, 307s these headers completely replace any pool-specific headers. 307s 307s :param retries: 307s Configure the number of retries to allow before raising a 307s :class:`~urllib3.exceptions.MaxRetryError` exception. 307s 307s Pass ``None`` to retry until you receive a response. Pass a 307s :class:`~urllib3.util.retry.Retry` object for fine-grained control 307s over different types of retries. 307s Pass an integer number to retry connection errors that many times, 307s but no other types of errors. Pass zero to never retry. 307s 307s If ``False``, then retries are disabled and any exception is raised 307s immediately. Also, instead of raising a MaxRetryError on redirects, 307s the redirect response will be returned. 307s 307s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 307s 307s :param timeout: 307s If specified, overrides the default timeout for this one 307s request. It may be a float (in seconds) or an instance of 307s :class:`urllib3.util.Timeout`. 307s 307s :param chunked: 307s If True, urllib3 will send the body using chunked transfer 307s encoding. Otherwise, urllib3 will send the body using the standard 307s content-length form. Defaults to False. 307s 307s :param response_conn: 307s Set this to ``None`` if you will handle releasing the connection or 307s set the connection to have the response release it. 307s 307s :param preload_content: 307s If True, the response's body will be preloaded during construction. 307s 307s :param decode_content: 307s If True, will attempt to decode the body based on the 307s 'content-encoding' header. 307s 307s :param enforce_content_length: 307s Enforce content length checking. Body returned by server must match 307s value of Content-Length header, if present. Otherwise, raise error. 307s """ 307s self.num_requests += 1 307s 307s timeout_obj = self._get_timeout(timeout) 307s timeout_obj.start_connect() 307s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 307s 307s try: 307s # Trigger any extra validation we need to do. 307s try: 307s self._validate_conn(conn) 307s except (SocketTimeout, BaseSSLError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 307s raise 307s 307s # _validate_conn() starts the connection to an HTTPS proxy 307s # so we need to wrap errors with 'ProxyError' here too. 307s except ( 307s OSError, 307s NewConnectionError, 307s TimeoutError, 307s BaseSSLError, 307s CertificateError, 307s SSLError, 307s ) as e: 307s new_e: Exception = e 307s if isinstance(e, (BaseSSLError, CertificateError)): 307s new_e = SSLError(e) 307s # If the connection didn't successfully connect to it's proxy 307s # then there 307s if isinstance( 307s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 307s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 307s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 307s raise new_e 307s 307s # conn.request() calls http.client.*.request, not the method in 307s # urllib3.request. It also calls makefile (recv) on the socket. 307s try: 307s conn.request( 307s method, 307s url, 307s body=body, 307s headers=headers, 307s chunked=chunked, 307s preload_content=preload_content, 307s decode_content=decode_content, 307s enforce_content_length=enforce_content_length, 307s ) 307s 307s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 307s # legitimately able to close the connection after sending a valid response. 307s # With this behaviour, the received response is still readable. 307s except BrokenPipeError: 307s pass 307s except OSError as e: 307s # MacOS/Linux 307s # EPROTOTYPE and ECONNRESET are needed on macOS 307s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 307s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 307s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 307s raise 307s 307s # Reset the timeout for the recv() on the socket 307s read_timeout = timeout_obj.read_timeout 307s 307s if not conn.is_closed: 307s # In Python 3 socket.py will catch EAGAIN and return None when you 307s # try and read into the file pointer created by http.client, which 307s # instead raises a BadStatusLine exception. Instead of catching 307s # the exception and assuming all BadStatusLine exceptions are read 307s # timeouts, check for a zero timeout before making the request. 307s if read_timeout == 0: 307s raise ReadTimeoutError( 307s self, url, f"Read timed out. (read timeout={read_timeout})" 307s ) 307s conn.timeout = read_timeout 307s 307s # Receive the response from the server 307s try: 307s response = conn.getresponse() 307s except (BaseSSLError, OSError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 307s raise 307s 307s # Set properties that are used by the pooling layer. 307s response.retries = retries 307s response._connection = response_conn # type: ignore[attr-defined] 307s response._pool = self # type: ignore[attr-defined] 307s 307s log.debug( 307s '%s://%s:%s "%s %s %s" %s %s', 307s self.scheme, 307s self.host, 307s self.port, 307s method, 307s url, 307s > response.version_string, 307s response.status, 307s response.length_remaining, 307s ) 307s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 307s 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 307s ----------------------------- Captured stderr call ----------------------------- 307s 127.0.0.1 - - [18/Jan/2025 02:35:07] "GET /gzip HTTP/1.1" 200 165 307s 127.0.0.1 - - [18/Jan/2025 02:35:07] "GET /gzip HTTP/1.1" 200 165 307s ________________________________ test_use_proxy ________________________________ 307s 307s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_use_proxy0') 307s httpbin = 307s proxy_server = 'http://0.0.0.0:43357' 307s 307s def test_use_proxy(tmpdir, httpbin, proxy_server): 307s """Ensure that it works with a proxy.""" 307s with vcr.use_cassette(str(tmpdir.join("proxy.yaml"))): 307s > response = requests.get(httpbin.url, proxies={"http": proxy_server}) 307s 307s tests/integration/test_proxy.py:53: 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s /usr/lib/python3/dist-packages/requests/api.py:73: in get 307s return request("get", url, params=params, **kwargs) 307s /usr/lib/python3/dist-packages/requests/api.py:59: in request 307s return session.request(method=method, url=url, **kwargs) 307s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 307s resp = self.send(prep, **send_kwargs) 307s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 307s r = adapter.send(request, **kwargs) 307s /usr/lib/python3/dist-packages/requests/adapters.py:667: in send 307s resp = conn.urlopen( 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 307s response = self._make_request( 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s 307s self = 307s conn = 307s method = 'GET', url = 'http://127.0.0.1:43645/', body = None 307s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate, br', 'Accept': '*/*', 'Connection': 'keep-alive'} 307s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 307s timeout = Timeout(connect=None, read=None, total=None), chunked = False 307s response_conn = 307s preload_content = False, decode_content = False, enforce_content_length = True 307s 307s def _make_request( 307s self, 307s conn: BaseHTTPConnection, 307s method: str, 307s url: str, 307s body: _TYPE_BODY | None = None, 307s headers: typing.Mapping[str, str] | None = None, 307s retries: Retry | None = None, 307s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 307s chunked: bool = False, 307s response_conn: BaseHTTPConnection | None = None, 307s preload_content: bool = True, 307s decode_content: bool = True, 307s enforce_content_length: bool = True, 307s ) -> BaseHTTPResponse: 307s """ 307s Perform a request on a given urllib connection object taken from our 307s pool. 307s 307s :param conn: 307s a connection from one of our connection pools 307s 307s :param method: 307s HTTP request method (such as GET, POST, PUT, etc.) 307s 307s :param url: 307s The URL to perform the request on. 307s 307s :param body: 307s Data to send in the request body, either :class:`str`, :class:`bytes`, 307s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 307s 307s :param headers: 307s Dictionary of custom headers to send, such as User-Agent, 307s If-None-Match, etc. If None, pool headers are used. If provided, 307s these headers completely replace any pool-specific headers. 307s 307s :param retries: 307s Configure the number of retries to allow before raising a 307s :class:`~urllib3.exceptions.MaxRetryError` exception. 307s 307s Pass ``None`` to retry until you receive a response. Pass a 307s :class:`~urllib3.util.retry.Retry` object for fine-grained control 307s over different types of retries. 307s Pass an integer number to retry connection errors that many times, 307s but no other types of errors. Pass zero to never retry. 307s 307s If ``False``, then retries are disabled and any exception is raised 307s immediately. Also, instead of raising a MaxRetryError on redirects, 307s the redirect response will be returned. 307s 307s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 307s 307s :param timeout: 307s If specified, overrides the default timeout for this one 307s request. It may be a float (in seconds) or an instance of 307s :class:`urllib3.util.Timeout`. 307s 307s :param chunked: 307s If True, urllib3 will send the body using chunked transfer 307s encoding. Otherwise, urllib3 will send the body using the standard 307s content-length form. Defaults to False. 307s 307s :param response_conn: 307s Set this to ``None`` if you will handle releasing the connection or 307s set the connection to have the response release it. 307s 307s :param preload_content: 307s If True, the response's body will be preloaded during construction. 307s 307s :param decode_content: 307s If True, will attempt to decode the body based on the 307s 'content-encoding' header. 307s 307s :param enforce_content_length: 307s Enforce content length checking. Body returned by server must match 307s value of Content-Length header, if present. Otherwise, raise error. 307s """ 307s self.num_requests += 1 307s 307s timeout_obj = self._get_timeout(timeout) 307s timeout_obj.start_connect() 307s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 307s 307s try: 307s # Trigger any extra validation we need to do. 307s try: 307s self._validate_conn(conn) 307s except (SocketTimeout, BaseSSLError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 307s raise 307s 307s # _validate_conn() starts the connection to an HTTPS proxy 307s # so we need to wrap errors with 'ProxyError' here too. 307s except ( 307s OSError, 307s NewConnectionError, 307s TimeoutError, 307s BaseSSLError, 307s CertificateError, 307s SSLError, 307s ) as e: 307s new_e: Exception = e 307s if isinstance(e, (BaseSSLError, CertificateError)): 307s new_e = SSLError(e) 307s # If the connection didn't successfully connect to it's proxy 307s # then there 307s if isinstance( 307s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 307s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 307s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 307s raise new_e 307s 307s # conn.request() calls http.client.*.request, not the method in 307s # urllib3.request. It also calls makefile (recv) on the socket. 307s try: 307s conn.request( 307s method, 307s url, 307s body=body, 307s headers=headers, 307s chunked=chunked, 307s preload_content=preload_content, 307s decode_content=decode_content, 307s enforce_content_length=enforce_content_length, 307s ) 307s 307s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 307s # legitimately able to close the connection after sending a valid response. 307s # With this behaviour, the received response is still readable. 307s except BrokenPipeError: 307s pass 307s except OSError as e: 307s # MacOS/Linux 307s # EPROTOTYPE and ECONNRESET are needed on macOS 307s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 307s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 307s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 307s raise 307s 307s # Reset the timeout for the recv() on the socket 307s read_timeout = timeout_obj.read_timeout 307s 307s if not conn.is_closed: 307s # In Python 3 socket.py will catch EAGAIN and return None when you 307s # try and read into the file pointer created by http.client, which 307s # instead raises a BadStatusLine exception. Instead of catching 307s # the exception and assuming all BadStatusLine exceptions are read 307s # timeouts, check for a zero timeout before making the request. 307s if read_timeout == 0: 307s raise ReadTimeoutError( 307s self, url, f"Read timed out. (read timeout={read_timeout})" 307s ) 307s conn.timeout = read_timeout 307s 307s # Receive the response from the server 307s try: 307s response = conn.getresponse() 307s except (BaseSSLError, OSError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 307s raise 307s 307s # Set properties that are used by the pooling layer. 307s response.retries = retries 307s response._connection = response_conn # type: ignore[attr-defined] 307s response._pool = self # type: ignore[attr-defined] 307s 307s log.debug( 307s '%s://%s:%s "%s %s %s" %s %s', 307s self.scheme, 307s self.host, 307s self.port, 307s method, 307s url, 307s > response.version_string, 307s response.status, 307s response.length_remaining, 307s ) 307s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 307s 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 307s ----------------------------- Captured stderr call ----------------------------- 307s 127.0.0.1 - - [18/Jan/2025 02:35:07] "GET / HTTP/1.1" 200 9358 307s 127.0.0.1 - - [18/Jan/2025 02:35:07] "GET http://127.0.0.1:43645/ HTTP/1.1" 200 - 307s ______________________________ test_cross_scheme _______________________________ 307s 307s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cross_scheme2') 307s httpbin = 307s httpbin_secure = 307s verify_pool_mgr = 307s 307s def test_cross_scheme(tmpdir, httpbin, httpbin_secure, verify_pool_mgr): 307s """Ensure that requests between schemes are treated separately""" 307s # First fetch a url under http, and then again under https and then 307s # ensure that we haven't served anything out of cache, and we have two 307s # requests / response pairs in the cassette 307s with vcr.use_cassette(str(tmpdir.join("cross_scheme.yaml"))) as cass: 307s > verify_pool_mgr.request("GET", httpbin_secure.url) 307s 307s tests/integration/test_urllib3.py:125: 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 307s return self.request_encode_url( 307s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 307s return self.urlopen(method, url, **extra_kw) 307s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 307s response = conn.urlopen(method, u.request_uri, **kw) 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 307s response = self._make_request( 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s 307s self = 307s conn = 307s method = 'GET', url = '/', body = None, headers = {} 307s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 307s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 307s chunked = False, response_conn = None, preload_content = True 307s decode_content = True, enforce_content_length = True 307s 307s def _make_request( 307s self, 307s conn: BaseHTTPConnection, 307s method: str, 307s url: str, 307s body: _TYPE_BODY | None = None, 307s headers: typing.Mapping[str, str] | None = None, 307s retries: Retry | None = None, 307s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 307s chunked: bool = False, 307s response_conn: BaseHTTPConnection | None = None, 307s preload_content: bool = True, 307s decode_content: bool = True, 307s enforce_content_length: bool = True, 307s ) -> BaseHTTPResponse: 307s """ 307s Perform a request on a given urllib connection object taken from our 307s pool. 307s 307s :param conn: 307s a connection from one of our connection pools 307s 307s :param method: 307s HTTP request method (such as GET, POST, PUT, etc.) 307s 307s :param url: 307s The URL to perform the request on. 307s 307s :param body: 307s Data to send in the request body, either :class:`str`, :class:`bytes`, 307s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 307s 307s :param headers: 307s Dictionary of custom headers to send, such as User-Agent, 307s If-None-Match, etc. If None, pool headers are used. If provided, 307s these headers completely replace any pool-specific headers. 307s 307s :param retries: 307s Configure the number of retries to allow before raising a 307s :class:`~urllib3.exceptions.MaxRetryError` exception. 307s 307s Pass ``None`` to retry until you receive a response. Pass a 307s :class:`~urllib3.util.retry.Retry` object for fine-grained control 307s over different types of retries. 307s Pass an integer number to retry connection errors that many times, 307s but no other types of errors. Pass zero to never retry. 307s 307s If ``False``, then retries are disabled and any exception is raised 307s immediately. Also, instead of raising a MaxRetryError on redirects, 307s the redirect response will be returned. 307s 307s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 307s 307s :param timeout: 307s If specified, overrides the default timeout for this one 307s request. It may be a float (in seconds) or an instance of 307s :class:`urllib3.util.Timeout`. 307s 307s :param chunked: 307s If True, urllib3 will send the body using chunked transfer 307s encoding. Otherwise, urllib3 will send the body using the standard 307s content-length form. Defaults to False. 307s 307s :param response_conn: 307s Set this to ``None`` if you will handle releasing the connection or 307s set the connection to have the response release it. 307s 307s :param preload_content: 307s If True, the response's body will be preloaded during construction. 307s 307s :param decode_content: 307s If True, will attempt to decode the body based on the 307s 'content-encoding' header. 307s 307s :param enforce_content_length: 307s Enforce content length checking. Body returned by server must match 307s value of Content-Length header, if present. Otherwise, raise error. 307s """ 307s self.num_requests += 1 307s 307s timeout_obj = self._get_timeout(timeout) 307s timeout_obj.start_connect() 307s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 307s 307s try: 307s # Trigger any extra validation we need to do. 307s try: 307s self._validate_conn(conn) 307s except (SocketTimeout, BaseSSLError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 307s raise 307s 307s # _validate_conn() starts the connection to an HTTPS proxy 307s # so we need to wrap errors with 'ProxyError' here too. 307s except ( 307s OSError, 307s NewConnectionError, 307s TimeoutError, 307s BaseSSLError, 307s CertificateError, 307s SSLError, 307s ) as e: 307s new_e: Exception = e 307s if isinstance(e, (BaseSSLError, CertificateError)): 307s new_e = SSLError(e) 307s # If the connection didn't successfully connect to it's proxy 307s # then there 307s if isinstance( 307s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 307s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 307s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 307s raise new_e 307s 307s # conn.request() calls http.client.*.request, not the method in 307s # urllib3.request. It also calls makefile (recv) on the socket. 307s try: 307s conn.request( 307s method, 307s url, 307s body=body, 307s headers=headers, 307s chunked=chunked, 307s preload_content=preload_content, 307s decode_content=decode_content, 307s enforce_content_length=enforce_content_length, 307s ) 307s 307s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 307s # legitimately able to close the connection after sending a valid response. 307s # With this behaviour, the received response is still readable. 307s except BrokenPipeError: 307s pass 307s except OSError as e: 307s # MacOS/Linux 307s # EPROTOTYPE and ECONNRESET are needed on macOS 307s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 307s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 307s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 307s raise 307s 307s # Reset the timeout for the recv() on the socket 307s read_timeout = timeout_obj.read_timeout 307s 307s if not conn.is_closed: 307s # In Python 3 socket.py will catch EAGAIN and return None when you 307s # try and read into the file pointer created by http.client, which 307s # instead raises a BadStatusLine exception. Instead of catching 307s # the exception and assuming all BadStatusLine exceptions are read 307s # timeouts, check for a zero timeout before making the request. 307s if read_timeout == 0: 307s raise ReadTimeoutError( 307s self, url, f"Read timed out. (read timeout={read_timeout})" 307s ) 307s conn.timeout = read_timeout 307s 307s # Receive the response from the server 307s try: 307s response = conn.getresponse() 307s except (BaseSSLError, OSError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 307s raise 307s 307s # Set properties that are used by the pooling layer. 307s response.retries = retries 307s response._connection = response_conn # type: ignore[attr-defined] 307s response._pool = self # type: ignore[attr-defined] 307s 307s log.debug( 307s '%s://%s:%s "%s %s %s" %s %s', 307s self.scheme, 307s self.host, 307s self.port, 307s method, 307s url, 307s > response.version_string, 307s response.status, 307s response.length_remaining, 307s ) 307s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 307s 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 307s ----------------------------- Captured stderr call ----------------------------- 307s 127.0.0.1 - - [18/Jan/2025 02:35:08] "GET / HTTP/1.1" 200 9358 307s ___________________ test_https_with_cert_validation_disabled ___________________ 307s 307s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_https_with_cert_validatio0') 307s httpbin_secure = 307s pool_mgr = 307s 307s def test_https_with_cert_validation_disabled(tmpdir, httpbin_secure, pool_mgr): 307s with vcr.use_cassette(str(tmpdir.join("cert_validation_disabled.yaml"))): 307s > pool_mgr.request("GET", httpbin_secure.url) 307s 307s tests/integration/test_urllib3.py:149: 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 307s return self.request_encode_url( 307s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 307s return self.urlopen(method, url, **extra_kw) 307s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 307s response = conn.urlopen(method, u.request_uri, **kw) 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 307s response = self._make_request( 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s 307s self = 307s conn = 307s method = 'GET', url = '/', body = None, headers = {} 307s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 307s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 307s chunked = False, response_conn = None, preload_content = True 307s decode_content = True, enforce_content_length = True 307s 307s def _make_request( 307s self, 307s conn: BaseHTTPConnection, 307s method: str, 307s url: str, 307s body: _TYPE_BODY | None = None, 307s headers: typing.Mapping[str, str] | None = None, 307s retries: Retry | None = None, 307s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 307s chunked: bool = False, 307s response_conn: BaseHTTPConnection | None = None, 307s preload_content: bool = True, 307s decode_content: bool = True, 307s enforce_content_length: bool = True, 307s ) -> BaseHTTPResponse: 307s """ 307s Perform a request on a given urllib connection object taken from our 307s pool. 307s 307s :param conn: 307s a connection from one of our connection pools 307s 307s :param method: 307s HTTP request method (such as GET, POST, PUT, etc.) 307s 307s :param url: 307s The URL to perform the request on. 307s 307s :param body: 307s Data to send in the request body, either :class:`str`, :class:`bytes`, 307s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 307s 307s :param headers: 307s Dictionary of custom headers to send, such as User-Agent, 307s If-None-Match, etc. If None, pool headers are used. If provided, 307s these headers completely replace any pool-specific headers. 307s 307s :param retries: 307s Configure the number of retries to allow before raising a 307s :class:`~urllib3.exceptions.MaxRetryError` exception. 307s 307s Pass ``None`` to retry until you receive a response. Pass a 307s :class:`~urllib3.util.retry.Retry` object for fine-grained control 307s over different types of retries. 307s Pass an integer number to retry connection errors that many times, 307s but no other types of errors. Pass zero to never retry. 307s 307s If ``False``, then retries are disabled and any exception is raised 307s immediately. Also, instead of raising a MaxRetryError on redirects, 307s the redirect response will be returned. 307s 307s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 307s 307s :param timeout: 307s If specified, overrides the default timeout for this one 307s request. It may be a float (in seconds) or an instance of 307s :class:`urllib3.util.Timeout`. 307s 307s :param chunked: 307s If True, urllib3 will send the body using chunked transfer 307s encoding. Otherwise, urllib3 will send the body using the standard 307s content-length form. Defaults to False. 307s 307s :param response_conn: 307s Set this to ``None`` if you will handle releasing the connection or 307s set the connection to have the response release it. 307s 307s :param preload_content: 307s If True, the response's body will be preloaded during construction. 307s 307s :param decode_content: 307s If True, will attempt to decode the body based on the 307s 'content-encoding' header. 307s 307s :param enforce_content_length: 307s Enforce content length checking. Body returned by server must match 307s value of Content-Length header, if present. Otherwise, raise error. 307s """ 307s self.num_requests += 1 307s 307s timeout_obj = self._get_timeout(timeout) 307s timeout_obj.start_connect() 307s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 307s 307s try: 307s # Trigger any extra validation we need to do. 307s try: 307s self._validate_conn(conn) 307s except (SocketTimeout, BaseSSLError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 307s raise 307s 307s # _validate_conn() starts the connection to an HTTPS proxy 307s # so we need to wrap errors with 'ProxyError' here too. 307s except ( 307s OSError, 307s NewConnectionError, 307s TimeoutError, 307s BaseSSLError, 307s CertificateError, 307s SSLError, 307s ) as e: 307s new_e: Exception = e 307s if isinstance(e, (BaseSSLError, CertificateError)): 307s new_e = SSLError(e) 307s # If the connection didn't successfully connect to it's proxy 307s # then there 307s if isinstance( 307s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 307s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 307s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 307s raise new_e 307s 307s # conn.request() calls http.client.*.request, not the method in 307s # urllib3.request. It also calls makefile (recv) on the socket. 307s try: 307s conn.request( 307s method, 307s url, 307s body=body, 307s headers=headers, 307s chunked=chunked, 307s preload_content=preload_content, 307s decode_content=decode_content, 307s enforce_content_length=enforce_content_length, 307s ) 307s 307s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 307s # legitimately able to close the connection after sending a valid response. 307s # With this behaviour, the received response is still readable. 307s except BrokenPipeError: 307s pass 307s except OSError as e: 307s # MacOS/Linux 307s # EPROTOTYPE and ECONNRESET are needed on macOS 307s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 307s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 307s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 307s raise 307s 307s # Reset the timeout for the recv() on the socket 307s read_timeout = timeout_obj.read_timeout 307s 307s if not conn.is_closed: 307s # In Python 3 socket.py will catch EAGAIN and return None when you 307s # try and read into the file pointer created by http.client, which 307s # instead raises a BadStatusLine exception. Instead of catching 307s # the exception and assuming all BadStatusLine exceptions are read 307s # timeouts, check for a zero timeout before making the request. 307s if read_timeout == 0: 307s raise ReadTimeoutError( 307s self, url, f"Read timed out. (read timeout={read_timeout})" 307s ) 307s conn.timeout = read_timeout 307s 307s # Receive the response from the server 307s try: 307s response = conn.getresponse() 307s except (BaseSSLError, OSError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 307s raise 307s 307s # Set properties that are used by the pooling layer. 307s response.retries = retries 307s response._connection = response_conn # type: ignore[attr-defined] 307s response._pool = self # type: ignore[attr-defined] 307s 307s log.debug( 307s '%s://%s:%s "%s %s %s" %s %s', 307s self.scheme, 307s self.host, 307s self.port, 307s method, 307s url, 307s > response.version_string, 307s response.status, 307s response.length_remaining, 307s ) 307s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 307s 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 307s ----------------------------- Captured stderr call ----------------------------- 307s 127.0.0.1 - - [18/Jan/2025 02:35:08] "GET / HTTP/1.1" 200 9358 307s _____________________________ test_domain_redirect _____________________________ 307s 307s def test_domain_redirect(): 307s """Ensure that redirects across domains are considered unique""" 307s # In this example, seomoz.org redirects to moz.com, and if those 307s # requests are considered identical, then we'll be stuck in a redirect 307s # loop. 307s url = "http://seomoz.org/" 307s with vcr.use_cassette("tests/fixtures/wild/domain_redirect.yaml") as cass: 307s > requests.get(url, headers={"User-Agent": "vcrpy-test"}) 307s 307s tests/integration/test_wild.py:20: 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s /usr/lib/python3/dist-packages/requests/api.py:73: in get 307s return request("get", url, params=params, **kwargs) 307s /usr/lib/python3/dist-packages/requests/api.py:59: in request 307s return session.request(method=method, url=url, **kwargs) 307s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 307s resp = self.send(prep, **send_kwargs) 307s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 307s r = adapter.send(request, **kwargs) 307s /usr/lib/python3/dist-packages/requests/adapters.py:667: in send 307s resp = conn.urlopen( 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 307s response = self._make_request( 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s 307s self = 307s conn = 307s method = 'GET', url = '/', body = None 307s headers = {'User-Agent': 'vcrpy-test', 'Accept-Encoding': 'gzip, deflate, br', 'Accept': '*/*', 'Connection': 'keep-alive'} 307s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 307s timeout = Timeout(connect=None, read=None, total=None), chunked = False 307s response_conn = 307s preload_content = False, decode_content = False, enforce_content_length = True 307s 307s def _make_request( 307s self, 307s conn: BaseHTTPConnection, 307s method: str, 307s url: str, 307s body: _TYPE_BODY | None = None, 307s headers: typing.Mapping[str, str] | None = None, 307s retries: Retry | None = None, 307s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 307s chunked: bool = False, 307s response_conn: BaseHTTPConnection | None = None, 307s preload_content: bool = True, 307s decode_content: bool = True, 307s enforce_content_length: bool = True, 307s ) -> BaseHTTPResponse: 307s """ 307s Perform a request on a given urllib connection object taken from our 307s pool. 307s 307s :param conn: 307s a connection from one of our connection pools 307s 307s :param method: 307s HTTP request method (such as GET, POST, PUT, etc.) 307s 307s :param url: 307s The URL to perform the request on. 307s 307s :param body: 307s Data to send in the request body, either :class:`str`, :class:`bytes`, 307s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 307s 307s :param headers: 307s Dictionary of custom headers to send, such as User-Agent, 307s If-None-Match, etc. If None, pool headers are used. If provided, 307s these headers completely replace any pool-specific headers. 307s 307s :param retries: 307s Configure the number of retries to allow before raising a 307s :class:`~urllib3.exceptions.MaxRetryError` exception. 307s 307s Pass ``None`` to retry until you receive a response. Pass a 307s :class:`~urllib3.util.retry.Retry` object for fine-grained control 307s over different types of retries. 307s Pass an integer number to retry connection errors that many times, 307s but no other types of errors. Pass zero to never retry. 307s 307s If ``False``, then retries are disabled and any exception is raised 307s immediately. Also, instead of raising a MaxRetryError on redirects, 307s the redirect response will be returned. 307s 307s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 307s 307s :param timeout: 307s If specified, overrides the default timeout for this one 307s request. It may be a float (in seconds) or an instance of 307s :class:`urllib3.util.Timeout`. 307s 307s :param chunked: 307s If True, urllib3 will send the body using chunked transfer 307s encoding. Otherwise, urllib3 will send the body using the standard 307s content-length form. Defaults to False. 307s 307s :param response_conn: 307s Set this to ``None`` if you will handle releasing the connection or 307s set the connection to have the response release it. 307s 307s :param preload_content: 307s If True, the response's body will be preloaded during construction. 307s 307s :param decode_content: 307s If True, will attempt to decode the body based on the 307s 'content-encoding' header. 307s 307s :param enforce_content_length: 307s Enforce content length checking. Body returned by server must match 307s value of Content-Length header, if present. Otherwise, raise error. 307s """ 307s self.num_requests += 1 307s 307s timeout_obj = self._get_timeout(timeout) 307s timeout_obj.start_connect() 307s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 307s 307s try: 307s # Trigger any extra validation we need to do. 307s try: 307s self._validate_conn(conn) 307s except (SocketTimeout, BaseSSLError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 307s raise 307s 307s # _validate_conn() starts the connection to an HTTPS proxy 307s # so we need to wrap errors with 'ProxyError' here too. 307s except ( 307s OSError, 307s NewConnectionError, 307s TimeoutError, 307s BaseSSLError, 307s CertificateError, 307s SSLError, 307s ) as e: 307s new_e: Exception = e 307s if isinstance(e, (BaseSSLError, CertificateError)): 307s new_e = SSLError(e) 307s # If the connection didn't successfully connect to it's proxy 307s # then there 307s if isinstance( 307s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 307s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 307s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 307s raise new_e 307s 307s # conn.request() calls http.client.*.request, not the method in 307s # urllib3.request. It also calls makefile (recv) on the socket. 307s try: 307s conn.request( 307s method, 307s url, 307s body=body, 307s headers=headers, 307s chunked=chunked, 307s preload_content=preload_content, 307s decode_content=decode_content, 307s enforce_content_length=enforce_content_length, 307s ) 307s 307s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 307s # legitimately able to close the connection after sending a valid response. 307s # With this behaviour, the received response is still readable. 307s except BrokenPipeError: 307s pass 307s except OSError as e: 307s # MacOS/Linux 307s # EPROTOTYPE and ECONNRESET are needed on macOS 307s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 307s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 307s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 307s raise 307s 307s # Reset the timeout for the recv() on the socket 307s read_timeout = timeout_obj.read_timeout 307s 307s if not conn.is_closed: 307s # In Python 3 socket.py will catch EAGAIN and return None when you 307s # try and read into the file pointer created by http.client, which 307s # instead raises a BadStatusLine exception. Instead of catching 307s # the exception and assuming all BadStatusLine exceptions are read 307s # timeouts, check for a zero timeout before making the request. 307s if read_timeout == 0: 307s raise ReadTimeoutError( 307s self, url, f"Read timed out. (read timeout={read_timeout})" 307s ) 307s conn.timeout = read_timeout 307s 307s # Receive the response from the server 307s try: 307s response = conn.getresponse() 307s except (BaseSSLError, OSError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 307s raise 307s 307s # Set properties that are used by the pooling layer. 307s response.retries = retries 307s response._connection = response_conn # type: ignore[attr-defined] 307s response._pool = self # type: ignore[attr-defined] 307s 307s log.debug( 307s '%s://%s:%s "%s %s %s" %s %s', 307s self.scheme, 307s self.host, 307s self.port, 307s method, 307s url, 307s > response.version_string, 307s response.status, 307s response.length_remaining, 307s ) 307s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 307s 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 307s _________________________________ test_cookies _________________________________ 307s 307s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cookies0') 307s httpbin = 307s 307s def test_cookies(tmpdir, httpbin): 307s testfile = str(tmpdir.join("cookies.yml")) 307s with vcr.use_cassette(testfile): 307s with requests.Session() as s: 307s > s.get(httpbin.url + "/cookies/set?k1=v1&k2=v2") 307s 307s tests/integration/test_wild.py:67: 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s /usr/lib/python3/dist-packages/requests/sessions.py:602: in get 307s return self.request("GET", url, **kwargs) 307s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 307s resp = self.send(prep, **send_kwargs) 307s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 307s r = adapter.send(request, **kwargs) 307s /usr/lib/python3/dist-packages/requests/adapters.py:667: in send 307s resp = conn.urlopen( 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 307s response = self._make_request( 307s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 307s 307s self = 307s conn = 307s method = 'GET', url = '/cookies/set?k1=v1&k2=v2', body = None 307s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate, br', 'Accept': '*/*', 'Connection': 'keep-alive'} 307s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 307s timeout = Timeout(connect=None, read=None, total=None), chunked = False 307s response_conn = 307s preload_content = False, decode_content = False, enforce_content_length = True 307s 307s def _make_request( 307s self, 307s conn: BaseHTTPConnection, 307s method: str, 307s url: str, 307s body: _TYPE_BODY | None = None, 307s headers: typing.Mapping[str, str] | None = None, 307s retries: Retry | None = None, 307s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 307s chunked: bool = False, 307s response_conn: BaseHTTPConnection | None = None, 307s preload_content: bool = True, 307s decode_content: bool = True, 307s enforce_content_length: bool = True, 307s ) -> BaseHTTPResponse: 307s """ 307s Perform a request on a given urllib connection object taken from our 307s pool. 307s 307s :param conn: 307s a connection from one of our connection pools 307s 307s :param method: 307s HTTP request method (such as GET, POST, PUT, etc.) 307s 307s :param url: 307s The URL to perform the request on. 307s 307s :param body: 307s Data to send in the request body, either :class:`str`, :class:`bytes`, 307s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 307s 307s :param headers: 307s Dictionary of custom headers to send, such as User-Agent, 307s If-None-Match, etc. If None, pool headers are used. If provided, 307s these headers completely replace any pool-specific headers. 307s 307s :param retries: 307s Configure the number of retries to allow before raising a 307s :class:`~urllib3.exceptions.MaxRetryError` exception. 307s 307s Pass ``None`` to retry until you receive a response. Pass a 307s :class:`~urllib3.util.retry.Retry` object for fine-grained control 307s over different types of retries. 307s Pass an integer number to retry connection errors that many times, 307s but no other types of errors. Pass zero to never retry. 307s 307s If ``False``, then retries are disabled and any exception is raised 307s immediately. Also, instead of raising a MaxRetryError on redirects, 307s the redirect response will be returned. 307s 307s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 307s 307s :param timeout: 307s If specified, overrides the default timeout for this one 307s request. It may be a float (in seconds) or an instance of 307s :class:`urllib3.util.Timeout`. 307s 307s :param chunked: 307s If True, urllib3 will send the body using chunked transfer 307s encoding. Otherwise, urllib3 will send the body using the standard 307s content-length form. Defaults to False. 307s 307s :param response_conn: 307s Set this to ``None`` if you will handle releasing the connection or 307s set the connection to have the response release it. 307s 307s :param preload_content: 307s If True, the response's body will be preloaded during construction. 307s 307s :param decode_content: 307s If True, will attempt to decode the body based on the 307s 'content-encoding' header. 307s 307s :param enforce_content_length: 307s Enforce content length checking. Body returned by server must match 307s value of Content-Length header, if present. Otherwise, raise error. 307s """ 307s self.num_requests += 1 307s 307s timeout_obj = self._get_timeout(timeout) 307s timeout_obj.start_connect() 307s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 307s 307s try: 307s # Trigger any extra validation we need to do. 307s try: 307s self._validate_conn(conn) 307s except (SocketTimeout, BaseSSLError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 307s raise 307s 307s # _validate_conn() starts the connection to an HTTPS proxy 307s # so we need to wrap errors with 'ProxyError' here too. 307s except ( 307s OSError, 307s NewConnectionError, 307s TimeoutError, 307s BaseSSLError, 307s CertificateError, 307s SSLError, 307s ) as e: 307s new_e: Exception = e 307s if isinstance(e, (BaseSSLError, CertificateError)): 307s new_e = SSLError(e) 307s # If the connection didn't successfully connect to it's proxy 307s # then there 307s if isinstance( 307s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 307s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 307s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 307s raise new_e 307s 307s # conn.request() calls http.client.*.request, not the method in 307s # urllib3.request. It also calls makefile (recv) on the socket. 307s try: 307s conn.request( 307s method, 307s url, 307s body=body, 307s headers=headers, 307s chunked=chunked, 307s preload_content=preload_content, 307s decode_content=decode_content, 307s enforce_content_length=enforce_content_length, 307s ) 307s 307s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 307s # legitimately able to close the connection after sending a valid response. 307s # With this behaviour, the received response is still readable. 307s except BrokenPipeError: 307s pass 307s except OSError as e: 307s # MacOS/Linux 307s # EPROTOTYPE and ECONNRESET are needed on macOS 307s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 307s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 307s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 307s raise 307s 307s # Reset the timeout for the recv() on the socket 307s read_timeout = timeout_obj.read_timeout 307s 307s if not conn.is_closed: 307s # In Python 3 socket.py will catch EAGAIN and return None when you 307s # try and read into the file pointer created by http.client, which 307s # instead raises a BadStatusLine exception. Instead of catching 307s # the exception and assuming all BadStatusLine exceptions are read 307s # timeouts, check for a zero timeout before making the request. 307s if read_timeout == 0: 307s raise ReadTimeoutError( 307s self, url, f"Read timed out. (read timeout={read_timeout})" 307s ) 307s conn.timeout = read_timeout 307s 307s # Receive the response from the server 307s try: 307s response = conn.getresponse() 307s except (BaseSSLError, OSError) as e: 307s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 307s raise 307s 307s # Set properties that are used by the pooling layer. 307s response.retries = retries 307s response._connection = response_conn # type: ignore[attr-defined] 307s response._pool = self # type: ignore[attr-defined] 307s 307s log.debug( 307s '%s://%s:%s "%s %s %s" %s %s', 307s self.scheme, 307s self.host, 307s self.port, 307s method, 307s url, 307s > response.version_string, 307s response.status, 307s response.length_remaining, 307s ) 307s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 307s 307s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 307s ----------------------------- Captured stderr call ----------------------------- 307s 127.0.0.1 - - [18/Jan/2025 02:35:08] "GET /cookies/set?k1=v1&k2=v2 HTTP/1.1" 302 203 307s =============================== warnings summary =============================== 307s tests/integration/test_config.py:10 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:10: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_config.py:24 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:24: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_config.py:34 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:34: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_config.py:47 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:47: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_config.py:69 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:69: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_disksaver.py:14 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_disksaver.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_disksaver.py:35 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_disksaver.py:35: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_httplib2.py:60 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_httplib2.py:60: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_register_matcher.py:16 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_register_matcher.py:16: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_register_matcher.py:32 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_register_matcher.py:32: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_urllib2.py:60 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_urllib2.py:60: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @mark.online 307s 307s tests/integration/test_urllib3.py:102 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_urllib3.py:102: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_wild.py:55 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_wild.py:55: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_wild.py:74 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_wild.py:74: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/unit/test_stubs.py:20 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/unit/test_stubs.py:20: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @mark.online 307s 307s tests/unit/test_unittest.py:131 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/unit/test_unittest.py:131: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/unit/test_unittest.py:166 307s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/unit/test_unittest.py:166: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 307s @pytest.mark.online 307s 307s tests/integration/test_wild.py::test_xmlrpclib 307s /usr/lib/python3.13/multiprocessing/popen_fork.py:67: DeprecationWarning: This process (pid=2451) is multi-threaded, use of fork() may lead to deadlocks in the child. 307s self.pid = os.fork() 307s 307s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 307s =========================== short test summary info ============================ 307s FAILED tests/integration/test_urllib3.py::test_status_code[http] - AttributeE... 307s FAILED tests/integration/test_urllib3.py::test_headers[http] - AttributeError... 307s FAILED tests/integration/test_urllib3.py::test_body[http] - AttributeError: '... 307s FAILED tests/integration/test_urllib3.py::test_auth[http] - AttributeError: '... 307s FAILED tests/integration/test_urllib3.py::test_auth_failed[http] - AttributeE... 307s FAILED tests/integration/test_urllib3.py::test_post[http] - AttributeError: '... 307s FAILED tests/integration/test_urllib3.py::test_gzip[http] - AttributeError: '... 307s FAILED tests/integration/test_urllib3.py::test_status_code[https] - Attribute... 307s FAILED tests/integration/test_urllib3.py::test_headers[https] - AttributeErro... 307s FAILED tests/integration/test_urllib3.py::test_body[https] - AttributeError: ... 307s FAILED tests/integration/test_urllib3.py::test_auth[https] - AttributeError: ... 307s FAILED tests/integration/test_urllib3.py::test_auth_failed[https] - Attribute... 307s FAILED tests/integration/test_urllib3.py::test_post[https] - AttributeError: ... 307s FAILED tests/integration/test_urllib3.py::test_gzip[https] - AttributeError: ... 307s FAILED tests/integration/test_proxy.py::test_use_proxy - AttributeError: 'VCR... 307s FAILED tests/integration/test_urllib3.py::test_cross_scheme - AttributeError:... 307s FAILED tests/integration/test_urllib3.py::test_https_with_cert_validation_disabled 307s FAILED tests/integration/test_wild.py::test_domain_redirect - AttributeError:... 307s FAILED tests/integration/test_wild.py::test_cookies - AttributeError: 'VCRHTT... 307s ==== 19 failed, 265 passed, 3 skipped, 19 deselected, 18 warnings in 4.91s ===== 307s E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build; python3.13 -m pytest --ignore tests/integration/test_aiohttp.py --ignore tests/integration/test_tornado.py --ignore tests/integration/test_requests.py -m "not online" -k "not test_basic_json_use and not test_load_cassette_with_custom_persister" 307s I: pybuild base:311: cd /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build; python3.12 -m pytest --ignore tests/integration/test_aiohttp.py --ignore tests/integration/test_tornado.py --ignore tests/integration/test_requests.py -m "not online" -k "not test_basic_json_use and not test_load_cassette_with_custom_persister" 308s ============================= test session starts ============================== 308s platform linux -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0 308s rootdir: /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build 308s plugins: typeguard-4.4.1, httpbin-2.1.0, tornado-0.8.1 308s collected 305 items / 19 deselected / 1 skipped / 286 selected 308s 308s tests/integration/test_basic.py .... [ 1%] 308s tests/integration/test_boto3.py ss [ 2%] 308s tests/integration/test_config.py . [ 2%] 308s tests/integration/test_filter.py .......... [ 5%] 308s tests/integration/test_httplib2.py ........ [ 8%] 309s tests/integration/test_urllib2.py ........ [ 11%] 309s tests/integration/test_urllib3.py FFFFFFF [ 13%] 309s tests/integration/test_httplib2.py ........ [ 16%] 309s tests/integration/test_urllib2.py ........ [ 19%] 310s tests/integration/test_urllib3.py FFFFFFF [ 22%] 310s tests/integration/test_httplib2.py . [ 22%] 310s tests/integration/test_ignore.py ..127.0.0.1 - - [18/Jan/2025 02:35:13] "GET / HTTP/1.1" 200 9358 310s .. [ 23%] 310s tests/integration/test_matchers.py .............. [ 28%] 310s tests/integration/test_multiple.py . [ 29%] 310s tests/integration/test_proxy.py F [ 29%] 310s tests/integration/test_record_mode.py ........ [ 32%] 310s tests/integration/test_register_persister.py .. [ 32%] 310s tests/integration/test_register_serializer.py . [ 33%] 310s tests/integration/test_request.py .. [ 33%] 310s tests/integration/test_stubs.py .... [ 35%] 310s tests/integration/test_urllib2.py . [ 35%] 311s tests/integration/test_urllib3.py FF. [ 36%] 311s tests/integration/test_wild.py F.F. [ 38%] 311s tests/unit/test_cassettes.py ............................... [ 48%] 311s tests/unit/test_errors.py .... [ 50%] 311s tests/unit/test_filters.py ........................ [ 58%] 311s tests/unit/test_json_serializer.py . [ 59%] 311s tests/unit/test_matchers.py ............................ [ 68%] 311s tests/unit/test_migration.py ... [ 69%] 311s tests/unit/test_persist.py .... [ 71%] 311s tests/unit/test_request.py ................. [ 77%] 311s tests/unit/test_response.py .... [ 78%] 311s tests/unit/test_serialize.py ............... [ 83%] 311s tests/unit/test_stubs.py ... [ 84%] 311s tests/unit/test_unittest.py ....... [ 87%] 311s tests/unit/test_util.py ........... [ 91%] 311s tests/unit/test_vcr.py ........................ [ 99%] 313s tests/unit/test_vcr_import.py . [100%] 313s 313s =================================== FAILURES =================================== 313s ____________________________ test_status_code[http] ____________________________ 313s 313s httpbin_both = 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_status_code_http_0') 313s verify_pool_mgr = 313s 313s def test_status_code(httpbin_both, tmpdir, verify_pool_mgr): 313s """Ensure that we can read the status code""" 313s url = httpbin_both.url 313s with vcr.use_cassette(str(tmpdir.join("atts.yaml"))): 313s > status_code = verify_pool_mgr.request("GET", url).status 313s 313s tests/integration/test_urllib3.py:34: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET / HTTP/1.1" 200 9358 313s ______________________________ test_headers[http] ______________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_headers_http_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_headers(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure that we can read the headers back""" 313s url = httpbin_both.url 313s with vcr.use_cassette(str(tmpdir.join("headers.yaml"))): 313s > headers = verify_pool_mgr.request("GET", url).headers 313s 313s tests/integration/test_urllib3.py:44: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET / HTTP/1.1" 200 9358 313s _______________________________ test_body[http] ________________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_body_http_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_body(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure the responses are all identical enough""" 313s url = httpbin_both.url + "/bytes/1024" 313s with vcr.use_cassette(str(tmpdir.join("body.yaml"))): 313s > content = verify_pool_mgr.request("GET", url).data 313s 313s tests/integration/test_urllib3.py:55: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/bytes/1024', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET /bytes/1024 HTTP/1.1" 200 1024 313s _______________________________ test_auth[http] ________________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_auth_http_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_auth(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure that we can handle basic auth""" 313s auth = ("user", "passwd") 313s headers = urllib3.util.make_headers(basic_auth="{}:{}".format(*auth)) 313s url = httpbin_both.url + "/basic-auth/user/passwd" 313s with vcr.use_cassette(str(tmpdir.join("auth.yaml"))): 313s > one = verify_pool_mgr.request("GET", url, headers=headers) 313s 313s tests/integration/test_urllib3.py:67: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/basic-auth/user/passwd', body = None 313s headers = {'authorization': 'Basic dXNlcjpwYXNzd2Q='} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET /basic-auth/user/passwd HTTP/1.1" 200 46 313s ____________________________ test_auth_failed[http] ____________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_auth_failed_http_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_auth_failed(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure that we can save failed auth statuses""" 313s auth = ("user", "wrongwrongwrong") 313s headers = urllib3.util.make_headers(basic_auth="{}:{}".format(*auth)) 313s url = httpbin_both.url + "/basic-auth/user/passwd" 313s with vcr.use_cassette(str(tmpdir.join("auth-failed.yaml"))) as cass: 313s # Ensure that this is empty to begin with 313s assert_cassette_empty(cass) 313s > one = verify_pool_mgr.request("GET", url, headers=headers) 313s 313s tests/integration/test_urllib3.py:83: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/basic-auth/user/passwd', body = None 313s headers = {'authorization': 'Basic dXNlcjp3cm9uZ3dyb25nd3Jvbmc='} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET /basic-auth/user/passwd HTTP/1.1" 401 0 313s _______________________________ test_post[http] ________________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_post_http_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_post(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure that we can post and cache the results""" 313s data = {"key1": "value1", "key2": "value2"} 313s url = httpbin_both.url + "/post" 313s with vcr.use_cassette(str(tmpdir.join("verify_pool_mgr.yaml"))): 313s > req1 = verify_pool_mgr.request("POST", url, data).data 313s 313s tests/integration/test_urllib3.py:94: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:143: in request 313s return self.request_encode_body( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:278: in request_encode_body 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'POST', url = '/post', body = {'key1': 'value1', 'key2': 'value2'} 313s headers = HTTPHeaderDict({}) 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "POST /post HTTP/1.1" 501 159 313s _______________________________ test_gzip[http] ________________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_gzip_http_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_gzip(tmpdir, httpbin_both, verify_pool_mgr): 313s """ 313s Ensure that requests (actually urllib3) is able to automatically decompress 313s the response body 313s """ 313s url = httpbin_both.url + "/gzip" 313s response = verify_pool_mgr.request("GET", url) 313s 313s with vcr.use_cassette(str(tmpdir.join("gzip.yaml"))): 313s > response = verify_pool_mgr.request("GET", url) 313s 313s tests/integration/test_urllib3.py:140: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/gzip', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET /gzip HTTP/1.1" 200 165 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET /gzip HTTP/1.1" 200 165 313s ___________________________ test_status_code[https] ____________________________ 313s 313s httpbin_both = 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_status_code_https_0') 313s verify_pool_mgr = 313s 313s def test_status_code(httpbin_both, tmpdir, verify_pool_mgr): 313s """Ensure that we can read the status code""" 313s url = httpbin_both.url 313s with vcr.use_cassette(str(tmpdir.join("atts.yaml"))): 313s > status_code = verify_pool_mgr.request("GET", url).status 313s 313s tests/integration/test_urllib3.py:34: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET / HTTP/1.1" 200 9358 313s _____________________________ test_headers[https] ______________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_headers_https_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_headers(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure that we can read the headers back""" 313s url = httpbin_both.url 313s with vcr.use_cassette(str(tmpdir.join("headers.yaml"))): 313s > headers = verify_pool_mgr.request("GET", url).headers 313s 313s tests/integration/test_urllib3.py:44: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET / HTTP/1.1" 200 9358 313s _______________________________ test_body[https] _______________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_body_https_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_body(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure the responses are all identical enough""" 313s url = httpbin_both.url + "/bytes/1024" 313s with vcr.use_cassette(str(tmpdir.join("body.yaml"))): 313s > content = verify_pool_mgr.request("GET", url).data 313s 313s tests/integration/test_urllib3.py:55: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/bytes/1024', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:12] "GET /bytes/1024 HTTP/1.1" 200 1024 313s _______________________________ test_auth[https] _______________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_auth_https_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_auth(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure that we can handle basic auth""" 313s auth = ("user", "passwd") 313s headers = urllib3.util.make_headers(basic_auth="{}:{}".format(*auth)) 313s url = httpbin_both.url + "/basic-auth/user/passwd" 313s with vcr.use_cassette(str(tmpdir.join("auth.yaml"))): 313s > one = verify_pool_mgr.request("GET", url, headers=headers) 313s 313s tests/integration/test_urllib3.py:67: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/basic-auth/user/passwd', body = None 313s headers = {'authorization': 'Basic dXNlcjpwYXNzd2Q='} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:13] "GET /basic-auth/user/passwd HTTP/1.1" 200 46 313s ___________________________ test_auth_failed[https] ____________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_auth_failed_https_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_auth_failed(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure that we can save failed auth statuses""" 313s auth = ("user", "wrongwrongwrong") 313s headers = urllib3.util.make_headers(basic_auth="{}:{}".format(*auth)) 313s url = httpbin_both.url + "/basic-auth/user/passwd" 313s with vcr.use_cassette(str(tmpdir.join("auth-failed.yaml"))) as cass: 313s # Ensure that this is empty to begin with 313s assert_cassette_empty(cass) 313s > one = verify_pool_mgr.request("GET", url, headers=headers) 313s 313s tests/integration/test_urllib3.py:83: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/basic-auth/user/passwd', body = None 313s headers = {'authorization': 'Basic dXNlcjp3cm9uZ3dyb25nd3Jvbmc='} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:13] "GET /basic-auth/user/passwd HTTP/1.1" 401 0 313s _______________________________ test_post[https] _______________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_post_https_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_post(tmpdir, httpbin_both, verify_pool_mgr): 313s """Ensure that we can post and cache the results""" 313s data = {"key1": "value1", "key2": "value2"} 313s url = httpbin_both.url + "/post" 313s with vcr.use_cassette(str(tmpdir.join("verify_pool_mgr.yaml"))): 313s > req1 = verify_pool_mgr.request("POST", url, data).data 313s 313s tests/integration/test_urllib3.py:94: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:143: in request 313s return self.request_encode_body( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:278: in request_encode_body 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'POST', url = '/post', body = {'key1': 'value1', 'key2': 'value2'} 313s headers = HTTPHeaderDict({}) 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:13] "POST /post HTTP/1.1" 501 159 313s _______________________________ test_gzip[https] _______________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_gzip_https_0') 313s httpbin_both = 313s verify_pool_mgr = 313s 313s def test_gzip(tmpdir, httpbin_both, verify_pool_mgr): 313s """ 313s Ensure that requests (actually urllib3) is able to automatically decompress 313s the response body 313s """ 313s url = httpbin_both.url + "/gzip" 313s response = verify_pool_mgr.request("GET", url) 313s 313s with vcr.use_cassette(str(tmpdir.join("gzip.yaml"))): 313s > response = verify_pool_mgr.request("GET", url) 313s 313s tests/integration/test_urllib3.py:140: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/gzip', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:13] "GET /gzip HTTP/1.1" 200 165 313s 127.0.0.1 - - [18/Jan/2025 02:35:13] "GET /gzip HTTP/1.1" 200 165 313s ________________________________ test_use_proxy ________________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_use_proxy0') 313s httpbin = 313s proxy_server = 'http://0.0.0.0:51455' 313s 313s def test_use_proxy(tmpdir, httpbin, proxy_server): 313s """Ensure that it works with a proxy.""" 313s with vcr.use_cassette(str(tmpdir.join("proxy.yaml"))): 313s > response = requests.get(httpbin.url, proxies={"http": proxy_server}) 313s 313s tests/integration/test_proxy.py:53: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/requests/api.py:73: in get 313s return request("get", url, params=params, **kwargs) 313s /usr/lib/python3/dist-packages/requests/api.py:59: in request 313s return session.request(method=method, url=url, **kwargs) 313s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 313s resp = self.send(prep, **send_kwargs) 313s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 313s r = adapter.send(request, **kwargs) 313s /usr/lib/python3/dist-packages/requests/adapters.py:667: in send 313s resp = conn.urlopen( 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = 'http://127.0.0.1:45061/', body = None 313s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate, br', 'Accept': '*/*', 'Connection': 'keep-alive'} 313s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 313s timeout = Timeout(connect=None, read=None, total=None), chunked = False 313s response_conn = 313s preload_content = False, decode_content = False, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:13] "GET / HTTP/1.1" 200 9358 313s 127.0.0.1 - - [18/Jan/2025 02:35:13] "GET http://127.0.0.1:45061/ HTTP/1.1" 200 - 313s ______________________________ test_cross_scheme _______________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_cross_scheme2') 313s httpbin = 313s httpbin_secure = 313s verify_pool_mgr = 313s 313s def test_cross_scheme(tmpdir, httpbin, httpbin_secure, verify_pool_mgr): 313s """Ensure that requests between schemes are treated separately""" 313s # First fetch a url under http, and then again under https and then 313s # ensure that we haven't served anything out of cache, and we have two 313s # requests / response pairs in the cassette 313s with vcr.use_cassette(str(tmpdir.join("cross_scheme.yaml"))) as cass: 313s > verify_pool_mgr.request("GET", httpbin_secure.url) 313s 313s tests/integration/test_urllib3.py:125: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:13] "GET / HTTP/1.1" 200 9358 313s ___________________ test_https_with_cert_validation_disabled ___________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_https_with_cert_validatio0') 313s httpbin_secure = 313s pool_mgr = 313s 313s def test_https_with_cert_validation_disabled(tmpdir, httpbin_secure, pool_mgr): 313s with vcr.use_cassette(str(tmpdir.join("cert_validation_disabled.yaml"))): 313s > pool_mgr.request("GET", httpbin_secure.url) 313s 313s tests/integration/test_urllib3.py:149: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:135: in request 313s return self.request_encode_url( 313s /usr/lib/python3/dist-packages/urllib3/_request_methods.py:182: in request_encode_url 313s return self.urlopen(method, url, **extra_kw) 313s /usr/lib/python3/dist-packages/urllib3/poolmanager.py:443: in urlopen 313s response = conn.urlopen(method, u.request_uri, **kw) 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/', body = None, headers = {} 313s retries = Retry(total=3, connect=None, read=None, redirect=None, status=None) 313s timeout = Timeout(connect=<_TYPE_DEFAULT.token: -1>, read=<_TYPE_DEFAULT.token: -1>, total=None) 313s chunked = False, response_conn = None, preload_content = True 313s decode_content = True, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:14] "GET / HTTP/1.1" 200 9358 313s _____________________________ test_domain_redirect _____________________________ 313s 313s def test_domain_redirect(): 313s """Ensure that redirects across domains are considered unique""" 313s # In this example, seomoz.org redirects to moz.com, and if those 313s # requests are considered identical, then we'll be stuck in a redirect 313s # loop. 313s url = "http://seomoz.org/" 313s with vcr.use_cassette("tests/fixtures/wild/domain_redirect.yaml") as cass: 313s > requests.get(url, headers={"User-Agent": "vcrpy-test"}) 313s 313s tests/integration/test_wild.py:20: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/requests/api.py:73: in get 313s return request("get", url, params=params, **kwargs) 313s /usr/lib/python3/dist-packages/requests/api.py:59: in request 313s return session.request(method=method, url=url, **kwargs) 313s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 313s resp = self.send(prep, **send_kwargs) 313s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 313s r = adapter.send(request, **kwargs) 313s /usr/lib/python3/dist-packages/requests/adapters.py:667: in send 313s resp = conn.urlopen( 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/', body = None 313s headers = {'User-Agent': 'vcrpy-test', 'Accept-Encoding': 'gzip, deflate, br', 'Accept': '*/*', 'Connection': 'keep-alive'} 313s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 313s timeout = Timeout(connect=None, read=None, total=None), chunked = False 313s response_conn = 313s preload_content = False, decode_content = False, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s _________________________________ test_cookies _________________________________ 313s 313s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-1/test_cookies0') 313s httpbin = 313s 313s def test_cookies(tmpdir, httpbin): 313s testfile = str(tmpdir.join("cookies.yml")) 313s with vcr.use_cassette(testfile): 313s with requests.Session() as s: 313s > s.get(httpbin.url + "/cookies/set?k1=v1&k2=v2") 313s 313s tests/integration/test_wild.py:67: 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s /usr/lib/python3/dist-packages/requests/sessions.py:602: in get 313s return self.request("GET", url, **kwargs) 313s /usr/lib/python3/dist-packages/requests/sessions.py:589: in request 313s resp = self.send(prep, **send_kwargs) 313s /usr/lib/python3/dist-packages/requests/sessions.py:703: in send 313s r = adapter.send(request, **kwargs) 313s /usr/lib/python3/dist-packages/requests/adapters.py:667: in send 313s resp = conn.urlopen( 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:787: in urlopen 313s response = self._make_request( 313s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 313s 313s self = 313s conn = 313s method = 'GET', url = '/cookies/set?k1=v1&k2=v2', body = None 313s headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate, br', 'Accept': '*/*', 'Connection': 'keep-alive'} 313s retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 313s timeout = Timeout(connect=None, read=None, total=None), chunked = False 313s response_conn = 313s preload_content = False, decode_content = False, enforce_content_length = True 313s 313s def _make_request( 313s self, 313s conn: BaseHTTPConnection, 313s method: str, 313s url: str, 313s body: _TYPE_BODY | None = None, 313s headers: typing.Mapping[str, str] | None = None, 313s retries: Retry | None = None, 313s timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 313s chunked: bool = False, 313s response_conn: BaseHTTPConnection | None = None, 313s preload_content: bool = True, 313s decode_content: bool = True, 313s enforce_content_length: bool = True, 313s ) -> BaseHTTPResponse: 313s """ 313s Perform a request on a given urllib connection object taken from our 313s pool. 313s 313s :param conn: 313s a connection from one of our connection pools 313s 313s :param method: 313s HTTP request method (such as GET, POST, PUT, etc.) 313s 313s :param url: 313s The URL to perform the request on. 313s 313s :param body: 313s Data to send in the request body, either :class:`str`, :class:`bytes`, 313s an iterable of :class:`str`/:class:`bytes`, or a file-like object. 313s 313s :param headers: 313s Dictionary of custom headers to send, such as User-Agent, 313s If-None-Match, etc. If None, pool headers are used. If provided, 313s these headers completely replace any pool-specific headers. 313s 313s :param retries: 313s Configure the number of retries to allow before raising a 313s :class:`~urllib3.exceptions.MaxRetryError` exception. 313s 313s Pass ``None`` to retry until you receive a response. Pass a 313s :class:`~urllib3.util.retry.Retry` object for fine-grained control 313s over different types of retries. 313s Pass an integer number to retry connection errors that many times, 313s but no other types of errors. Pass zero to never retry. 313s 313s If ``False``, then retries are disabled and any exception is raised 313s immediately. Also, instead of raising a MaxRetryError on redirects, 313s the redirect response will be returned. 313s 313s :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 313s 313s :param timeout: 313s If specified, overrides the default timeout for this one 313s request. It may be a float (in seconds) or an instance of 313s :class:`urllib3.util.Timeout`. 313s 313s :param chunked: 313s If True, urllib3 will send the body using chunked transfer 313s encoding. Otherwise, urllib3 will send the body using the standard 313s content-length form. Defaults to False. 313s 313s :param response_conn: 313s Set this to ``None`` if you will handle releasing the connection or 313s set the connection to have the response release it. 313s 313s :param preload_content: 313s If True, the response's body will be preloaded during construction. 313s 313s :param decode_content: 313s If True, will attempt to decode the body based on the 313s 'content-encoding' header. 313s 313s :param enforce_content_length: 313s Enforce content length checking. Body returned by server must match 313s value of Content-Length header, if present. Otherwise, raise error. 313s """ 313s self.num_requests += 1 313s 313s timeout_obj = self._get_timeout(timeout) 313s timeout_obj.start_connect() 313s conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) 313s 313s try: 313s # Trigger any extra validation we need to do. 313s try: 313s self._validate_conn(conn) 313s except (SocketTimeout, BaseSSLError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) 313s raise 313s 313s # _validate_conn() starts the connection to an HTTPS proxy 313s # so we need to wrap errors with 'ProxyError' here too. 313s except ( 313s OSError, 313s NewConnectionError, 313s TimeoutError, 313s BaseSSLError, 313s CertificateError, 313s SSLError, 313s ) as e: 313s new_e: Exception = e 313s if isinstance(e, (BaseSSLError, CertificateError)): 313s new_e = SSLError(e) 313s # If the connection didn't successfully connect to it's proxy 313s # then there 313s if isinstance( 313s new_e, (OSError, NewConnectionError, TimeoutError, SSLError) 313s ) and (conn and conn.proxy and not conn.has_connected_to_proxy): 313s new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) 313s raise new_e 313s 313s # conn.request() calls http.client.*.request, not the method in 313s # urllib3.request. It also calls makefile (recv) on the socket. 313s try: 313s conn.request( 313s method, 313s url, 313s body=body, 313s headers=headers, 313s chunked=chunked, 313s preload_content=preload_content, 313s decode_content=decode_content, 313s enforce_content_length=enforce_content_length, 313s ) 313s 313s # We are swallowing BrokenPipeError (errno.EPIPE) since the server is 313s # legitimately able to close the connection after sending a valid response. 313s # With this behaviour, the received response is still readable. 313s except BrokenPipeError: 313s pass 313s except OSError as e: 313s # MacOS/Linux 313s # EPROTOTYPE and ECONNRESET are needed on macOS 313s # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ 313s # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE. 313s if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET: 313s raise 313s 313s # Reset the timeout for the recv() on the socket 313s read_timeout = timeout_obj.read_timeout 313s 313s if not conn.is_closed: 313s # In Python 3 socket.py will catch EAGAIN and return None when you 313s # try and read into the file pointer created by http.client, which 313s # instead raises a BadStatusLine exception. Instead of catching 313s # the exception and assuming all BadStatusLine exceptions are read 313s # timeouts, check for a zero timeout before making the request. 313s if read_timeout == 0: 313s raise ReadTimeoutError( 313s self, url, f"Read timed out. (read timeout={read_timeout})" 313s ) 313s conn.timeout = read_timeout 313s 313s # Receive the response from the server 313s try: 313s response = conn.getresponse() 313s except (BaseSSLError, OSError) as e: 313s self._raise_timeout(err=e, url=url, timeout_value=read_timeout) 313s raise 313s 313s # Set properties that are used by the pooling layer. 313s response.retries = retries 313s response._connection = response_conn # type: ignore[attr-defined] 313s response._pool = self # type: ignore[attr-defined] 313s 313s log.debug( 313s '%s://%s:%s "%s %s %s" %s %s', 313s self.scheme, 313s self.host, 313s self.port, 313s method, 313s url, 313s > response.version_string, 313s response.status, 313s response.length_remaining, 313s ) 313s E AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' 313s 313s /usr/lib/python3/dist-packages/urllib3/connectionpool.py:551: AttributeError 313s ----------------------------- Captured stderr call ----------------------------- 313s 127.0.0.1 - - [18/Jan/2025 02:35:14] "GET /cookies/set?k1=v1&k2=v2 HTTP/1.1" 302 203 313s =============================== warnings summary =============================== 313s tests/integration/test_config.py:10 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:10: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_config.py:24 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:24: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_config.py:34 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:34: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_config.py:47 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:47: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_config.py:69 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_config.py:69: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_disksaver.py:14 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_disksaver.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_disksaver.py:35 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_disksaver.py:35: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_httplib2.py:60 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_httplib2.py:60: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_register_matcher.py:16 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_register_matcher.py:16: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_register_matcher.py:32 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_register_matcher.py:32: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_urllib2.py:60 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_urllib2.py:60: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @mark.online 313s 313s tests/integration/test_urllib3.py:102 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_urllib3.py:102: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_wild.py:55 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_wild.py:55: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_wild.py:74 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/integration/test_wild.py:74: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/unit/test_stubs.py:20 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/unit/test_stubs.py:20: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @mark.online 313s 313s tests/unit/test_unittest.py:131 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/unit/test_unittest.py:131: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/unit/test_unittest.py:166 313s /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build/tests/unit/test_unittest.py:166: PytestUnknownMarkWarning: Unknown pytest.mark.online - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 313s @pytest.mark.online 313s 313s tests/integration/test_wild.py::test_xmlrpclib 313s /usr/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=2459) is multi-threaded, use of fork() may lead to deadlocks in the child. 313s self.pid = os.fork() 313s 313s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 313s =========================== short test summary info ============================ 313s FAILED tests/integration/test_urllib3.py::test_status_code[http] - AttributeE... 313s FAILED tests/integration/test_urllib3.py::test_headers[http] - AttributeError... 313s FAILED tests/integration/test_urllib3.py::test_body[http] - AttributeError: '... 313s FAILED tests/integration/test_urllib3.py::test_auth[http] - AttributeError: '... 313s FAILED tests/integration/test_urllib3.py::test_auth_failed[http] - AttributeE... 313s FAILED tests/integration/test_urllib3.py::test_post[http] - AttributeError: '... 313s FAILED tests/integration/test_urllib3.py::test_gzip[http] - AttributeError: '... 313s FAILED tests/integration/test_urllib3.py::test_status_code[https] - Attribute... 313s FAILED tests/integration/test_urllib3.py::test_headers[https] - AttributeErro... 313s FAILED tests/integration/test_urllib3.py::test_body[https] - AttributeError: ... 313s FAILED tests/integration/test_urllib3.py::test_auth[https] - AttributeError: ... 313s FAILED tests/integration/test_urllib3.py::test_auth_failed[https] - Attribute... 313s FAILED tests/integration/test_urllib3.py::test_post[https] - AttributeError: ... 313s FAILED tests/integration/test_urllib3.py::test_gzip[https] - AttributeError: ... 313s FAILED tests/integration/test_proxy.py::test_use_proxy - AttributeError: 'VCR... 313s FAILED tests/integration/test_urllib3.py::test_cross_scheme - AttributeError:... 313s FAILED tests/integration/test_urllib3.py::test_https_with_cert_validation_disabled 313s FAILED tests/integration/test_wild.py::test_domain_redirect - AttributeError:... 313s FAILED tests/integration/test_wild.py::test_cookies - AttributeError: 'VCRHTT... 313s ==== 19 failed, 265 passed, 3 skipped, 19 deselected, 18 warnings in 5.33s ===== 313s E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /tmp/autopkgtest.3IzRbD/autopkgtest_tmp/build; python3.12 -m pytest --ignore tests/integration/test_aiohttp.py --ignore tests/integration/test_tornado.py --ignore tests/integration/test_requests.py -m "not online" -k "not test_basic_json_use and not test_load_cassette_with_custom_persister" 313s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p "3.13 3.12" returned exit code 13 313s make: *** [/tmp/eKaVGyctf6/run:4: pybuild-autopkgtest] Error 25 313s pybuild-autopkgtest: error: /tmp/eKaVGyctf6/run pybuild-autopkgtest returned exit code 2 313s autopkgtest [02:35:16]: test pybuild-autopkgtest: -----------------------] 317s autopkgtest [02:35:20]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 317s pybuild-autopkgtest FAIL non-zero exit status 25 321s autopkgtest [02:35:24]: @@@@@@@@@@@@@@@@@@@@ summary 321s pybuild-autopkgtest FAIL non-zero exit status 25