https://launchpad.net/ubuntu/+archive/test-rebuild-20191220-focal/+build/18344617 RUN: /usr/share/launchpad-buildd/bin/builder-prep Kernel version: Linux lcy01-amd64-011 4.4.0-170-generic #199-Ubuntu SMP Thu Nov 14 01:45:04 UTC 2019 x86_64 Buildd toolchain package versions: launchpad-buildd_183 python-lpbuildd_183 sbuild_0.67.0-2ubuntu7.1 bzr-builder_0.7.3+bzr174~ppa13~ubuntu14.10.1 bzr_2.7.0-2ubuntu3.1 git-build-recipe_0.3.6~git201906051340.ff11471~ubuntu16.04.1 git_1:2.7.4-0ubuntu1.7 dpkg-dev_1.18.4ubuntu1.6 python-debian_0.1.27ubuntu2. Syncing the system clock with the buildd NTP service... 5 Jan 10:14:57 ntpdate[1898]: adjust time server 10.211.37.1 offset -0.000112 sec RUN: /usr/share/launchpad-buildd/bin/in-target unpack-chroot --backend=chroot --series=focal --arch=amd64 PACKAGEBUILD-18344617 --image-type chroot /home/buildd/filecache-default/e96c25c651525abc9f0cabeb95ea71010abf4ecb Creating target for build PACKAGEBUILD-18344617 RUN: /usr/share/launchpad-buildd/bin/in-target mount-chroot --backend=chroot --series=focal --arch=amd64 PACKAGEBUILD-18344617 Starting target for build PACKAGEBUILD-18344617 RUN: /usr/share/launchpad-buildd/bin/in-target override-sources-list --backend=chroot --series=focal --arch=amd64 PACKAGEBUILD-18344617 'deb http://ftpmaster.internal/ubuntu focal main restricted universe multiverse' Overriding sources.list in build-PACKAGEBUILD-18344617 RUN: /usr/share/launchpad-buildd/bin/in-target update-debian-chroot --backend=chroot --series=focal --arch=amd64 PACKAGEBUILD-18344617 Updating target for build PACKAGEBUILD-18344617 Get:1 http://ftpmaster.internal/ubuntu focal InRelease [255 kB] Get:2 http://ftpmaster.internal/ubuntu focal/main amd64 Packages [966 kB] Get:3 http://ftpmaster.internal/ubuntu focal/main Translation-en [499 kB] Get:4 http://ftpmaster.internal/ubuntu focal/restricted amd64 Packages [18.4 kB] Get:5 http://ftpmaster.internal/ubuntu focal/restricted Translation-en [5768 B] Get:6 http://ftpmaster.internal/ubuntu focal/universe amd64 Packages [8671 kB] Get:7 http://ftpmaster.internal/ubuntu focal/universe Translation-en [5195 kB] Get:8 http://ftpmaster.internal/ubuntu focal/multiverse amd64 Packages [152 kB] Get:9 http://ftpmaster.internal/ubuntu focal/multiverse Translation-en [110 kB] Fetched 15.9 MB in 2s (6683 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... The following packages were automatically installed and are no longer required: libhogweed4 libisl21 libnettle6 libperl5.28 perl-modules-5.28 Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: libhogweed5 libisl22 libnettle7 libperl5.30 perl-modules-5.30 The following packages will be upgraded: apt base-files base-passwd bash binutils binutils-common binutils-x86-64-linux-gnu bsdutils bzip2 cpp-9 debianutils fdisk g++-9 gcc-9 gcc-9-base gpg gpg-agent gpgconf gpgv gzip hostname libacl1 libapparmor1 libapt-pkg5.90 libasan5 libatomic1 libattr1 libaudit-common libaudit1 libbinutils libblkid1 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcap-ng0 libcap2 libcc1-0 libcryptsetup12 libdebconfclient0 libdevmapper1.02.1 libfdisk1 libgcc-9-dev libgcc1 libgcrypt20 libgnutls30 libgomp1 libitm1 libjson-c4 libkmod2 liblockfile-bin liblockfile1 liblsan0 liblz4-1 libmount1 libncurses6 libncursesw6 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre2-8-0 libquadmath0 libseccomp2 libselinux1 libsemanage-common libsemanage1 libsepol1 libsmartcols1 libsqlite3-0 libstdc++-9-dev libstdc++6 libsystemd0 libtasn1-6 libtinfo6 libtsan0 libubsan1 libudev1 libuuid1 libzstd1 linux-libc-dev lsb-base mount ncurses-base ncurses-bin perl perl-base sensible-utils systemd systemd-sysv sysvinit-utils util-linux 94 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 70.2 MB of archives. After this operation, 51.0 MB of additional disk space will be used. Get:1 http://ftpmaster.internal/ubuntu focal/main amd64 libc6-dev amd64 2.30-0ubuntu3 [2549 kB] Get:2 http://ftpmaster.internal/ubuntu focal/main amd64 libc-dev-bin amd64 2.30-0ubuntu3 [71.8 kB] Get:3 http://ftpmaster.internal/ubuntu focal/main amd64 linux-libc-dev amd64 5.3.0-24.26 [1096 kB] Get:4 http://ftpmaster.internal/ubuntu focal/main amd64 libisl22 amd64 0.22-2 [592 kB] Get:5 http://ftpmaster.internal/ubuntu focal/main amd64 libcc1-0 amd64 9.2.1-21ubuntu1 [49.0 kB] Get:6 http://ftpmaster.internal/ubuntu focal/main amd64 binutils-x86-64-linux-gnu amd64 2.33.1-6ubuntu3 [1639 kB] Get:7 http://ftpmaster.internal/ubuntu focal/main amd64 libbinutils amd64 2.33.1-6ubuntu3 [474 kB] Get:8 http://ftpmaster.internal/ubuntu focal/main amd64 binutils-common amd64 2.33.1-6ubuntu3 [203 kB] Get:9 http://ftpmaster.internal/ubuntu focal/main amd64 binutils amd64 2.33.1-6ubuntu3 [3400 B] Get:10 http://ftpmaster.internal/ubuntu focal/main amd64 gcc-9-base amd64 9.2.1-21ubuntu1 [19.1 kB] Get:11 http://ftpmaster.internal/ubuntu focal/main amd64 libgcc1 amd64 1:9.2.1-21ubuntu1 [40.8 kB] Get:12 http://ftpmaster.internal/ubuntu focal/main amd64 libgomp1 amd64 9.2.1-21ubuntu1 [89.3 kB] Get:13 http://ftpmaster.internal/ubuntu focal/main amd64 libitm1 amd64 9.2.1-21ubuntu1 [28.1 kB] Get:14 http://ftpmaster.internal/ubuntu focal/main amd64 libatomic1 amd64 9.2.1-21ubuntu1 [9236 B] Get:15 http://ftpmaster.internal/ubuntu focal/main amd64 libasan5 amd64 9.2.1-21ubuntu1 [395 kB] Get:16 http://ftpmaster.internal/ubuntu focal/main amd64 liblsan0 amd64 9.2.1-21ubuntu1 [139 kB] Get:17 http://ftpmaster.internal/ubuntu focal/main amd64 libtsan0 amd64 9.2.1-21ubuntu1 [301 kB] Get:18 http://ftpmaster.internal/ubuntu focal/main amd64 libubsan1 amd64 9.2.1-21ubuntu1 [130 kB] Get:19 http://ftpmaster.internal/ubuntu focal/main amd64 libquadmath0 amd64 9.2.1-21ubuntu1 [146 kB] Get:20 http://ftpmaster.internal/ubuntu focal/main amd64 g++-9 amd64 9.2.1-21ubuntu1 [11.0 MB] Get:21 http://ftpmaster.internal/ubuntu focal/main amd64 libstdc++-9-dev amd64 9.2.1-21ubuntu1 [1709 kB] Get:22 http://ftpmaster.internal/ubuntu focal/main amd64 libgcc-9-dev amd64 9.2.1-21ubuntu1 [2362 kB] Get:23 http://ftpmaster.internal/ubuntu focal/main amd64 gcc-9 amd64 9.2.1-21ubuntu1 [10.4 MB] Get:24 http://ftpmaster.internal/ubuntu focal/main amd64 cpp-9 amd64 9.2.1-21ubuntu1 [9729 kB] Get:25 http://ftpmaster.internal/ubuntu focal/main amd64 libstdc++6 amd64 9.2.1-21ubuntu1 [512 kB] Get:26 http://ftpmaster.internal/ubuntu focal/main amd64 libc6 amd64 2.30-0ubuntu3 [2725 kB] Get:27 http://ftpmaster.internal/ubuntu focal/main amd64 base-files amd64 11ubuntu2 [60.1 kB] Get:28 http://ftpmaster.internal/ubuntu focal/main amd64 debianutils amd64 4.9.1 [85.8 kB] Get:29 http://ftpmaster.internal/ubuntu focal/main amd64 bash amd64 5.0-5ubuntu1 [639 kB] Get:30 http://ftpmaster.internal/ubuntu focal/main amd64 bsdutils amd64 1:2.34-0.1ubuntu4 [63.8 kB] Get:31 http://ftpmaster.internal/ubuntu focal/main amd64 gzip amd64 1.10-0ubuntu4 [95.3 kB] Get:32 http://ftpmaster.internal/ubuntu focal/main amd64 hostname amd64 3.23 [11.4 kB] Get:33 http://ftpmaster.internal/ubuntu focal/main amd64 ncurses-bin amd64 6.1+20191019-1ubuntu1 [172 kB] Get:34 http://ftpmaster.internal/ubuntu focal/main amd64 perl-modules-5.30 all 5.30.0-9 [2739 kB] Get:35 http://ftpmaster.internal/ubuntu focal/main amd64 libperl5.30 amd64 5.30.0-9 [3950 kB] Get:36 http://ftpmaster.internal/ubuntu focal/main amd64 perl amd64 5.30.0-9 [224 kB] Get:37 http://ftpmaster.internal/ubuntu focal/main amd64 perl-base amd64 5.30.0-9 [1511 kB] Get:38 http://ftpmaster.internal/ubuntu focal/main amd64 bzip2 amd64 1.0.8-2 [34.1 kB] Get:39 http://ftpmaster.internal/ubuntu focal/main amd64 libbz2-1.0 amd64 1.0.8-2 [32.3 kB] Get:40 http://ftpmaster.internal/ubuntu focal/main amd64 libblkid1 amd64 2.34-0.1ubuntu4 [137 kB] Get:41 http://ftpmaster.internal/ubuntu focal/main amd64 libuuid1 amd64 2.34-0.1ubuntu4 [20.5 kB] Get:42 http://ftpmaster.internal/ubuntu focal/main amd64 libfdisk1 amd64 2.34-0.1ubuntu4 [175 kB] Get:43 http://ftpmaster.internal/ubuntu focal/main amd64 libpcre2-8-0 amd64 10.34-7 [197 kB] Get:44 http://ftpmaster.internal/ubuntu focal/main amd64 libselinux1 amd64 3.0-1 [68.7 kB] Get:45 http://ftpmaster.internal/ubuntu focal/main amd64 libmount1 amd64 2.34-0.1ubuntu4 [149 kB] Get:46 http://ftpmaster.internal/ubuntu focal/main amd64 libncurses6 amd64 6.1+20191019-1ubuntu1 [101 kB] Get:47 http://ftpmaster.internal/ubuntu focal/main amd64 libtinfo6 amd64 6.1+20191019-1ubuntu1 [85.9 kB] Get:48 http://ftpmaster.internal/ubuntu focal/main amd64 libncursesw6 amd64 6.1+20191019-1ubuntu1 [132 kB] Get:49 http://ftpmaster.internal/ubuntu focal/main amd64 libsmartcols1 amd64 2.34-0.1ubuntu4 [101 kB] Get:50 http://ftpmaster.internal/ubuntu focal/main amd64 fdisk amd64 2.34-0.1ubuntu4 [120 kB] Get:51 http://ftpmaster.internal/ubuntu focal/main amd64 util-linux amd64 2.34-0.1ubuntu4 [1022 kB] Get:52 http://ftpmaster.internal/ubuntu focal/main amd64 libdebconfclient0 amd64 0.250ubuntu2 [6336 B] Get:53 http://ftpmaster.internal/ubuntu focal/main amd64 base-passwd amd64 3.5.47 [47.7 kB] Get:54 http://ftpmaster.internal/ubuntu focal/main amd64 libc-bin amd64 2.30-0ubuntu3 [625 kB] Get:55 http://ftpmaster.internal/ubuntu focal/main amd64 ncurses-base all 6.1+20191019-1ubuntu1 [17.9 kB] Get:56 http://ftpmaster.internal/ubuntu focal/main amd64 lsb-base all 11.1.0ubuntu2 [12.1 kB] Get:57 http://ftpmaster.internal/ubuntu focal/main amd64 sysvinit-utils amd64 2.96-1ubuntu1 [20.8 kB] Get:58 http://ftpmaster.internal/ubuntu focal/main amd64 liblz4-1 amd64 1.9.2-2 [55.9 kB] Get:59 http://ftpmaster.internal/ubuntu focal/main amd64 systemd-sysv amd64 244-3ubuntu1 [9368 B] Get:60 http://ftpmaster.internal/ubuntu focal/main amd64 libacl1 amd64 2.2.53-5ubuntu1 [18.7 kB] Get:61 http://ftpmaster.internal/ubuntu focal/main amd64 libapparmor1 amd64 2.13.3-7ubuntu1 [34.3 kB] Get:62 http://ftpmaster.internal/ubuntu focal/main amd64 libaudit-common all 1:2.8.5-2ubuntu5 [4076 B] Get:63 http://ftpmaster.internal/ubuntu focal/main amd64 libcap-ng0 amd64 0.7.9-2.1 [11.1 kB] Get:64 http://ftpmaster.internal/ubuntu focal/main amd64 libaudit1 amd64 1:2.8.5-2ubuntu5 [39.1 kB] Get:65 http://ftpmaster.internal/ubuntu focal/main amd64 libcap2 amd64 1:2.27-1 [14.1 kB] Get:66 http://ftpmaster.internal/ubuntu focal/main amd64 libudev1 amd64 244-3ubuntu1 [76.3 kB] Get:67 http://ftpmaster.internal/ubuntu focal/main amd64 libdevmapper1.02.1 amd64 2:1.02.155-2ubuntu7 [127 kB] Get:68 http://ftpmaster.internal/ubuntu focal/main amd64 libjson-c4 amd64 0.13.1+dfsg-6 [29.2 kB] Get:69 http://ftpmaster.internal/ubuntu focal/main amd64 libcryptsetup12 amd64 2:2.2.2-1ubuntu1 [182 kB] Get:70 http://ftpmaster.internal/ubuntu focal/main amd64 libnettle7 amd64 3.5.1+really3.5.1-2 [114 kB] Get:71 http://ftpmaster.internal/ubuntu focal/main amd64 libhogweed5 amd64 3.5.1+really3.5.1-2 [138 kB] Get:72 http://ftpmaster.internal/ubuntu focal/main amd64 libp11-kit0 amd64 0.23.18.1-2 [189 kB] Get:73 http://ftpmaster.internal/ubuntu focal/main amd64 libtasn1-6 amd64 4.15.0-2 [37.7 kB] Get:74 http://ftpmaster.internal/ubuntu focal/main amd64 libgnutls30 amd64 3.6.11.1-2 [793 kB] Get:75 http://ftpmaster.internal/ubuntu focal/main amd64 libkmod2 amd64 26-3ubuntu1 [42.9 kB] Get:76 http://ftpmaster.internal/ubuntu focal/main amd64 libpam0g amd64 1.3.1-5ubuntu4 [55.4 kB] Get:77 http://ftpmaster.internal/ubuntu focal/main amd64 libseccomp2 amd64 2.4.2-2ubuntu1 [39.4 kB] Get:78 http://ftpmaster.internal/ubuntu focal/main amd64 mount amd64 2.34-0.1ubuntu4 [115 kB] Get:79 http://ftpmaster.internal/ubuntu focal/main amd64 systemd amd64 244-3ubuntu1 [3677 kB] Get:80 http://ftpmaster.internal/ubuntu focal/main amd64 libsystemd0 amd64 244-3ubuntu1 [260 kB] Get:81 http://ftpmaster.internal/ubuntu focal/main amd64 libzstd1 amd64 1.4.4+dfsg-1 [237 kB] Get:82 http://ftpmaster.internal/ubuntu focal/main amd64 libapt-pkg5.90 amd64 1.9.5 [851 kB] Get:83 http://ftpmaster.internal/ubuntu focal/main amd64 libgcrypt20 amd64 1.8.5-3ubuntu1 [419 kB] Get:84 http://ftpmaster.internal/ubuntu focal/main amd64 gpgv amd64 2.2.17-3ubuntu1 [200 kB] Get:85 http://ftpmaster.internal/ubuntu focal/main amd64 apt amd64 1.9.5 [1281 kB] Get:86 http://ftpmaster.internal/ubuntu focal/main amd64 libpam-modules-bin amd64 1.3.1-5ubuntu4 [37.7 kB] Get:87 http://ftpmaster.internal/ubuntu focal/main amd64 libpam-modules amd64 1.3.1-5ubuntu4 [250 kB] Get:88 http://ftpmaster.internal/ubuntu focal/main amd64 libattr1 amd64 1:2.4.48-5 [12.7 kB] Get:89 http://ftpmaster.internal/ubuntu focal/main amd64 libpam-runtime all 1.3.1-5ubuntu4 [37.3 kB] Get:90 http://ftpmaster.internal/ubuntu focal/main amd64 libsepol1 amd64 3.0-1 [252 kB] Get:91 http://ftpmaster.internal/ubuntu focal/main amd64 libsemanage-common all 3.0-1 [9880 B] Get:92 http://ftpmaster.internal/ubuntu focal/main amd64 libsemanage1 amd64 3.0-1 [85.3 kB] Get:93 http://ftpmaster.internal/ubuntu focal/main amd64 sensible-utils all 0.0.12+nmu1 [15.0 kB] Get:94 http://ftpmaster.internal/ubuntu focal/main amd64 libsqlite3-0 amd64 3.30.1-1ubuntu1 [540 kB] Get:95 http://ftpmaster.internal/ubuntu focal/main amd64 gpg amd64 2.2.17-3ubuntu1 [479 kB] Get:96 http://ftpmaster.internal/ubuntu focal/main amd64 gpgconf amd64 2.2.17-3ubuntu1 [124 kB] Get:97 http://ftpmaster.internal/ubuntu focal/main amd64 gpg-agent amd64 2.2.17-3ubuntu1 [232 kB] Get:98 http://ftpmaster.internal/ubuntu focal/main amd64 liblockfile-bin amd64 1.16-1.1 [11.7 kB] Get:99 http://ftpmaster.internal/ubuntu focal/main amd64 liblockfile1 amd64 1.16-1.1 [6680 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 70.2 MB in 1s (61.0 MB/s) (Reading database ... 12741 files and directories currently installed.) Preparing to unpack .../0-libc6-dev_2.30-0ubuntu3_amd64.deb ... Unpacking libc6-dev:amd64 (2.30-0ubuntu3) over (2.30-0ubuntu2) ... Preparing to unpack .../1-libc-dev-bin_2.30-0ubuntu3_amd64.deb ... Unpacking libc-dev-bin (2.30-0ubuntu3) over (2.30-0ubuntu2) ... Preparing to unpack .../2-linux-libc-dev_5.3.0-24.26_amd64.deb ... Unpacking linux-libc-dev:amd64 (5.3.0-24.26) over (5.3.0-18.19) ... Selecting previously unselected package libisl22:amd64. Preparing to unpack .../3-libisl22_0.22-2_amd64.deb ... Unpacking libisl22:amd64 (0.22-2) ... Preparing to unpack .../4-libcc1-0_9.2.1-21ubuntu1_amd64.deb ... Unpacking libcc1-0:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../5-binutils-x86-64-linux-gnu_2.33.1-6ubuntu3_amd64.deb ... Unpacking binutils-x86-64-linux-gnu (2.33.1-6ubuntu3) over (2.33-2ubuntu1) ... Preparing to unpack .../6-libbinutils_2.33.1-6ubuntu3_amd64.deb ... Unpacking libbinutils:amd64 (2.33.1-6ubuntu3) over (2.33-2ubuntu1) ... Preparing to unpack .../7-binutils-common_2.33.1-6ubuntu3_amd64.deb ... Unpacking binutils-common:amd64 (2.33.1-6ubuntu3) over (2.33-2ubuntu1) ... Preparing to unpack .../8-binutils_2.33.1-6ubuntu3_amd64.deb ... Unpacking binutils (2.33.1-6ubuntu3) over (2.33-2ubuntu1) ... Preparing to unpack .../9-gcc-9-base_9.2.1-21ubuntu1_amd64.deb ... Unpacking gcc-9-base:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Setting up gcc-9-base:amd64 (9.2.1-21ubuntu1) ... (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../libgcc1_1%3a9.2.1-21ubuntu1_amd64.deb ... Unpacking libgcc1:amd64 (1:9.2.1-21ubuntu1) over (1:9.2.1-9ubuntu2) ... Setting up libgcc1:amd64 (1:9.2.1-21ubuntu1) ... (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../00-libgomp1_9.2.1-21ubuntu1_amd64.deb ... Unpacking libgomp1:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../01-libitm1_9.2.1-21ubuntu1_amd64.deb ... Unpacking libitm1:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../02-libatomic1_9.2.1-21ubuntu1_amd64.deb ... Unpacking libatomic1:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../03-libasan5_9.2.1-21ubuntu1_amd64.deb ... Unpacking libasan5:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../04-liblsan0_9.2.1-21ubuntu1_amd64.deb ... Unpacking liblsan0:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../05-libtsan0_9.2.1-21ubuntu1_amd64.deb ... Unpacking libtsan0:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../06-libubsan1_9.2.1-21ubuntu1_amd64.deb ... Unpacking libubsan1:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../07-libquadmath0_9.2.1-21ubuntu1_amd64.deb ... Unpacking libquadmath0:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../08-g++-9_9.2.1-21ubuntu1_amd64.deb ... Unpacking g++-9 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../09-libstdc++-9-dev_9.2.1-21ubuntu1_amd64.deb ... Unpacking libstdc++-9-dev:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../10-libgcc-9-dev_9.2.1-21ubuntu1_amd64.deb ... Unpacking libgcc-9-dev:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../11-gcc-9_9.2.1-21ubuntu1_amd64.deb ... Unpacking gcc-9 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../12-cpp-9_9.2.1-21ubuntu1_amd64.deb ... Unpacking cpp-9 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Preparing to unpack .../13-libstdc++6_9.2.1-21ubuntu1_amd64.deb ... Unpacking libstdc++6:amd64 (9.2.1-21ubuntu1) over (9.2.1-9ubuntu2) ... Setting up libstdc++6:amd64 (9.2.1-21ubuntu1) ... (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../libc6_2.30-0ubuntu3_amd64.deb ... Unpacking libc6:amd64 (2.30-0ubuntu3) over (2.30-0ubuntu2) ... Setting up libc6:amd64 (2.30-0ubuntu3) ... (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../base-files_11ubuntu2_amd64.deb ... Unpacking base-files (11ubuntu2) over (10.2ubuntu7) ... Setting up base-files (11ubuntu2) ... Installing new version of config file /etc/debian_version ... Installing new version of config file /etc/issue ... Installing new version of config file /etc/issue.net ... Installing new version of config file /etc/lsb-release ... Installing new version of config file /etc/update-motd.d/50-motd-news ... Updating /root/.profile to current default. (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../debianutils_4.9.1_amd64.deb ... Unpacking debianutils (4.9.1) over (4.8.6.3) ... Setting up debianutils (4.9.1) ... (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../bash_5.0-5ubuntu1_amd64.deb ... Unpacking bash (5.0-5ubuntu1) over (5.0-4ubuntu1) ... Setting up bash (5.0-5ubuntu1) ... 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 (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../bsdutils_1%3a2.34-0.1ubuntu4_amd64.deb ... Unpacking bsdutils (1:2.34-0.1ubuntu4) over (1:2.34-0.1ubuntu2) ... Setting up bsdutils (1:2.34-0.1ubuntu4) ... (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../gzip_1.10-0ubuntu4_amd64.deb ... Unpacking gzip (1.10-0ubuntu4) over (1.10-0ubuntu3) ... Setting up gzip (1.10-0ubuntu4) ... (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../hostname_3.23_amd64.deb ... Unpacking hostname (3.23) over (3.22) ... Setting up hostname (3.23) ... (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../ncurses-bin_6.1+20191019-1ubuntu1_amd64.deb ... Unpacking ncurses-bin (6.1+20191019-1ubuntu1) over (6.1+20190803-1ubuntu1) ... Setting up ncurses-bin (6.1+20191019-1ubuntu1) ... (Reading database ... 12747 files and directories currently installed.) Preparing to unpack .../perl_5.30.0-9_amd64.deb ... Unpacking perl (5.30.0-9) over (5.28.1-6build1) ... Replacing files in old package perl-base (5.28.1-6build1) ... Selecting previously unselected package perl-modules-5.30. Preparing to unpack .../perl-modules-5.30_5.30.0-9_all.deb ... Unpacking perl-modules-5.30 (5.30.0-9) ... Selecting previously unselected package libperl5.30:amd64. Preparing to unpack .../libperl5.30_5.30.0-9_amd64.deb ... Unpacking libperl5.30:amd64 (5.30.0-9) ... Preparing to unpack .../perl-base_5.30.0-9_amd64.deb ... Unpacking perl-base (5.30.0-9) over (5.28.1-6build1) ... Setting up perl-base (5.30.0-9) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../bzip2_1.0.8-2_amd64.deb ... Unpacking bzip2 (1.0.8-2) over (1.0.6-9.2) ... Preparing to unpack .../libbz2-1.0_1.0.8-2_amd64.deb ... Unpacking libbz2-1.0:amd64 (1.0.8-2) over (1.0.6-9.2) ... Setting up libbz2-1.0:amd64 (1.0.8-2) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libblkid1_2.34-0.1ubuntu4_amd64.deb ... Unpacking libblkid1:amd64 (2.34-0.1ubuntu4) over (2.34-0.1ubuntu2) ... Setting up libblkid1:amd64 (2.34-0.1ubuntu4) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libuuid1_2.34-0.1ubuntu4_amd64.deb ... Unpacking libuuid1:amd64 (2.34-0.1ubuntu4) over (2.34-0.1ubuntu2) ... Setting up libuuid1:amd64 (2.34-0.1ubuntu4) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libfdisk1_2.34-0.1ubuntu4_amd64.deb ... Unpacking libfdisk1:amd64 (2.34-0.1ubuntu4) over (2.34-0.1ubuntu2) ... Setting up libfdisk1:amd64 (2.34-0.1ubuntu4) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libpcre2-8-0_10.34-7_amd64.deb ... Unpacking libpcre2-8-0:amd64 (10.34-7) over (10.32-5) ... Setting up libpcre2-8-0:amd64 (10.34-7) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libselinux1_3.0-1_amd64.deb ... Unpacking libselinux1:amd64 (3.0-1) over (2.9-2) ... Setting up libselinux1:amd64 (3.0-1) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libmount1_2.34-0.1ubuntu4_amd64.deb ... Unpacking libmount1:amd64 (2.34-0.1ubuntu4) over (2.34-0.1ubuntu2) ... Setting up libmount1:amd64 (2.34-0.1ubuntu4) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libncurses6_6.1+20191019-1ubuntu1_amd64.deb ... Unpacking libncurses6:amd64 (6.1+20191019-1ubuntu1) over (6.1+20190803-1ubuntu1) ... Preparing to unpack .../libtinfo6_6.1+20191019-1ubuntu1_amd64.deb ... Unpacking libtinfo6:amd64 (6.1+20191019-1ubuntu1) over (6.1+20190803-1ubuntu1) ... Setting up libtinfo6:amd64 (6.1+20191019-1ubuntu1) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libncursesw6_6.1+20191019-1ubuntu1_amd64.deb ... Unpacking libncursesw6:amd64 (6.1+20191019-1ubuntu1) over (6.1+20190803-1ubuntu1) ... Setting up libncursesw6:amd64 (6.1+20191019-1ubuntu1) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libsmartcols1_2.34-0.1ubuntu4_amd64.deb ... Unpacking libsmartcols1:amd64 (2.34-0.1ubuntu4) over (2.34-0.1ubuntu2) ... Setting up libsmartcols1:amd64 (2.34-0.1ubuntu4) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../fdisk_2.34-0.1ubuntu4_amd64.deb ... Unpacking fdisk (2.34-0.1ubuntu4) over (2.34-0.1ubuntu2) ... Setting up fdisk (2.34-0.1ubuntu4) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../util-linux_2.34-0.1ubuntu4_amd64.deb ... Unpacking util-linux (2.34-0.1ubuntu4) over (2.34-0.1ubuntu2) ... Setting up util-linux (2.34-0.1ubuntu4) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libdebconfclient0_0.250ubuntu2_amd64.deb ... Unpacking libdebconfclient0:amd64 (0.250ubuntu2) over (0.249ubuntu1) ... Setting up libdebconfclient0:amd64 (0.250ubuntu2) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../base-passwd_3.5.47_amd64.deb ... Unpacking base-passwd (3.5.47) over (3.5.46) ... Setting up base-passwd (3.5.47) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../libc-bin_2.30-0ubuntu3_amd64.deb ... Unpacking libc-bin (2.30-0ubuntu3) over (2.30-0ubuntu2) ... Setting up libc-bin (2.30-0ubuntu3) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../ncurses-base_6.1+20191019-1ubuntu1_all.deb ... Unpacking ncurses-base (6.1+20191019-1ubuntu1) over (6.1+20190803-1ubuntu1) ... Setting up ncurses-base (6.1+20191019-1ubuntu1) ... (Reading database ... 14650 files and directories currently installed.) Preparing to unpack .../lsb-base_11.1.0ubuntu2_all.deb ... Unpacking lsb-base (11.1.0ubuntu2) over (11.0.1ubuntu1) ... Setting up lsb-base (11.1.0ubuntu2) ... (Reading database ... 14649 files and directories currently installed.) Preparing to unpack .../sysvinit-utils_2.96-1ubuntu1_amd64.deb ... Unpacking sysvinit-utils (2.96-1ubuntu1) over (2.95-5ubuntu2) ... Setting up sysvinit-utils (2.96-1ubuntu1) ... (Reading database ... 14649 files and directories currently installed.) Preparing to unpack .../liblz4-1_1.9.2-2_amd64.deb ... Unpacking liblz4-1:amd64 (1.9.2-2) over (1.9.1-1) ... Setting up liblz4-1:amd64 (1.9.2-2) ... (Reading database ... 14649 files and directories currently installed.) Preparing to unpack .../systemd-sysv_244-3ubuntu1_amd64.deb ... Unpacking systemd-sysv (244-3ubuntu1) over (242-7ubuntu3) ... Preparing to unpack .../libacl1_2.2.53-5ubuntu1_amd64.deb ... Unpacking libacl1:amd64 (2.2.53-5ubuntu1) over (2.2.53-4) ... Setting up libacl1:amd64 (2.2.53-5ubuntu1) ... (Reading database ... 14649 files and directories currently installed.) Preparing to unpack .../libapparmor1_2.13.3-7ubuntu1_amd64.deb ... Unpacking libapparmor1:amd64 (2.13.3-7ubuntu1) over (2.13.3-5ubuntu1) ... Preparing to unpack .../libaudit-common_1%3a2.8.5-2ubuntu5_all.deb ... Unpacking libaudit-common (1:2.8.5-2ubuntu5) over (1:2.8.5-2ubuntu1) ... Setting up libaudit-common (1:2.8.5-2ubuntu5) ... (Reading database ... 14649 files and directories currently installed.) Preparing to unpack .../libcap-ng0_0.7.9-2.1_amd64.deb ... Unpacking libcap-ng0:amd64 (0.7.9-2.1) over (0.7.9-2) ... Setting up libcap-ng0:amd64 (0.7.9-2.1) ... (Reading database ... 14649 files and directories currently installed.) Preparing to unpack .../libaudit1_1%3a2.8.5-2ubuntu5_amd64.deb ... Unpacking libaudit1:amd64 (1:2.8.5-2ubuntu5) over (1:2.8.5-2ubuntu1) ... Setting up libaudit1:amd64 (1:2.8.5-2ubuntu5) ... (Reading database ... 14649 files and directories currently installed.) Preparing to unpack .../libcap2_1%3a2.27-1_amd64.deb ... Unpacking libcap2:amd64 (1:2.27-1) over (1:2.25-2) ... Preparing to unpack .../libudev1_244-3ubuntu1_amd64.deb ... Unpacking libudev1:amd64 (244-3ubuntu1) over (242-7ubuntu3) ... Setting up libudev1:amd64 (244-3ubuntu1) ... (Reading database ... 14649 files and directories currently installed.) Preparing to unpack .../libdevmapper1.02.1_2%3a1.02.155-2ubuntu7_amd64.deb ... Unpacking libdevmapper1.02.1:amd64 (2:1.02.155-2ubuntu7) over (2:1.02.155-2ubuntu6) ... Preparing to unpack .../libjson-c4_0.13.1+dfsg-6_amd64.deb ... Unpacking libjson-c4:amd64 (0.13.1+dfsg-6) over (0.13.1+dfsg-4) ... Preparing to unpack .../libcryptsetup12_2%3a2.2.2-1ubuntu1_amd64.deb ... Unpacking libcryptsetup12:amd64 (2:2.2.2-1ubuntu1) over (2:2.2.0-3ubuntu1) ... Selecting previously unselected package libnettle7:amd64. Preparing to unpack .../libnettle7_3.5.1+really3.5.1-2_amd64.deb ... Unpacking libnettle7:amd64 (3.5.1+really3.5.1-2) ... Setting up libnettle7:amd64 (3.5.1+really3.5.1-2) ... Selecting previously unselected package libhogweed5:amd64. (Reading database ... 14656 files and directories currently installed.) Preparing to unpack .../libhogweed5_3.5.1+really3.5.1-2_amd64.deb ... Unpacking libhogweed5:amd64 (3.5.1+really3.5.1-2) ... Setting up libhogweed5:amd64 (3.5.1+really3.5.1-2) ... (Reading database ... 14659 files and directories currently installed.) Preparing to unpack .../libp11-kit0_0.23.18.1-2_amd64.deb ... Unpacking libp11-kit0:amd64 (0.23.18.1-2) over (0.23.17-2) ... Setting up libp11-kit0:amd64 (0.23.18.1-2) ... (Reading database ... 14659 files and directories currently installed.) Preparing to unpack .../libtasn1-6_4.15.0-2_amd64.deb ... Unpacking libtasn1-6:amd64 (4.15.0-2) over (4.14-3) ... Setting up libtasn1-6:amd64 (4.15.0-2) ... (Reading database ... 14659 files and directories currently installed.) Preparing to unpack .../libgnutls30_3.6.11.1-2_amd64.deb ... Unpacking libgnutls30:amd64 (3.6.11.1-2) over (3.6.9-5ubuntu1) ... Setting up libgnutls30:amd64 (3.6.11.1-2) ... (Reading database ... 14658 files and directories currently installed.) Preparing to unpack .../libkmod2_26-3ubuntu1_amd64.deb ... Unpacking libkmod2:amd64 (26-3ubuntu1) over (26-1ubuntu1) ... Preparing to unpack .../libpam0g_1.3.1-5ubuntu4_amd64.deb ... Unpacking libpam0g:amd64 (1.3.1-5ubuntu4) over (1.3.1-5ubuntu1) ... Setting up libpam0g:amd64 (1.3.1-5ubuntu4) ... (Reading database ... 14658 files and directories currently installed.) Preparing to unpack .../libseccomp2_2.4.2-2ubuntu1_amd64.deb ... Unpacking libseccomp2:amd64 (2.4.2-2ubuntu1) over (2.4.1-0ubuntu0.19.10.3) ... Setting up libseccomp2:amd64 (2.4.2-2ubuntu1) ... (Reading database ... 14658 files and directories currently installed.) Preparing to unpack .../mount_2.34-0.1ubuntu4_amd64.deb ... Unpacking mount (2.34-0.1ubuntu4) over (2.34-0.1ubuntu2) ... Preparing to unpack .../systemd_244-3ubuntu1_amd64.deb ... Unpacking systemd (244-3ubuntu1) over (242-7ubuntu3) ... Preparing to unpack .../libsystemd0_244-3ubuntu1_amd64.deb ... Unpacking libsystemd0:amd64 (244-3ubuntu1) over (242-7ubuntu3) ... Setting up libsystemd0:amd64 (244-3ubuntu1) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libzstd1_1.4.4+dfsg-1_amd64.deb ... Unpacking libzstd1:amd64 (1.4.4+dfsg-1) over (1.4.3+dfsg-1) ... Setting up libzstd1:amd64 (1.4.4+dfsg-1) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libapt-pkg5.90_1.9.5_amd64.deb ... Unpacking libapt-pkg5.90:amd64 (1.9.5) over (1.9.4) ... Setting up libapt-pkg5.90:amd64 (1.9.5) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libgcrypt20_1.8.5-3ubuntu1_amd64.deb ... Unpacking libgcrypt20:amd64 (1.8.5-3ubuntu1) over (1.8.4-5ubuntu2) ... Setting up libgcrypt20:amd64 (1.8.5-3ubuntu1) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../gpgv_2.2.17-3ubuntu1_amd64.deb ... Unpacking gpgv (2.2.17-3ubuntu1) over (2.2.12-1ubuntu3) ... Setting up gpgv (2.2.17-3ubuntu1) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../archives/apt_1.9.5_amd64.deb ... Unpacking apt (1.9.5) over (1.9.4) ... Setting up apt (1.9.5) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libpam-modules-bin_1.3.1-5ubuntu4_amd64.deb ... Unpacking libpam-modules-bin (1.3.1-5ubuntu4) over (1.3.1-5ubuntu1) ... Setting up libpam-modules-bin (1.3.1-5ubuntu4) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libpam-modules_1.3.1-5ubuntu4_amd64.deb ... Unpacking libpam-modules:amd64 (1.3.1-5ubuntu4) over (1.3.1-5ubuntu1) ... Setting up libpam-modules:amd64 (1.3.1-5ubuntu4) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libattr1_1%3a2.4.48-5_amd64.deb ... Unpacking libattr1:amd64 (1:2.4.48-5) over (1:2.4.48-4) ... Setting up libattr1:amd64 (1:2.4.48-5) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libpam-runtime_1.3.1-5ubuntu4_all.deb ... Unpacking libpam-runtime (1.3.1-5ubuntu4) over (1.3.1-5ubuntu1) ... Setting up libpam-runtime (1.3.1-5ubuntu4) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libsepol1_3.0-1_amd64.deb ... Unpacking libsepol1:amd64 (3.0-1) over (2.9-2) ... Setting up libsepol1:amd64 (3.0-1) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libsemanage-common_3.0-1_all.deb ... Unpacking libsemanage-common (3.0-1) over (2.9-3) ... Setting up libsemanage-common (3.0-1) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libsemanage1_3.0-1_amd64.deb ... Unpacking libsemanage1:amd64 (3.0-1) over (2.9-3) ... Setting up libsemanage1:amd64 (3.0-1) ... (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../0-sensible-utils_0.0.12+nmu1_all.deb ... Unpacking sensible-utils (0.0.12+nmu1) over (0.0.12) ... Preparing to unpack .../1-libsqlite3-0_3.30.1-1ubuntu1_amd64.deb ... Unpacking libsqlite3-0:amd64 (3.30.1-1ubuntu1) over (3.29.0-2) ... Preparing to unpack .../2-gpg_2.2.17-3ubuntu1_amd64.deb ... Unpacking gpg (2.2.17-3ubuntu1) over (2.2.12-1ubuntu3) ... Preparing to unpack .../3-gpgconf_2.2.17-3ubuntu1_amd64.deb ... Unpacking gpgconf (2.2.17-3ubuntu1) over (2.2.12-1ubuntu3) ... Preparing to unpack .../4-gpg-agent_2.2.17-3ubuntu1_amd64.deb ... Unpacking gpg-agent (2.2.17-3ubuntu1) over (2.2.12-1ubuntu3) ... Preparing to unpack .../5-liblockfile-bin_1.16-1.1_amd64.deb ... Unpacking liblockfile-bin (1.16-1.1) over (1.15-1) ... Preparing to unpack .../6-liblockfile1_1.16-1.1_amd64.deb ... Unpacking liblockfile1:amd64 (1.16-1.1) over (1.15-1) ... Setting up libapparmor1:amd64 (2.13.3-7ubuntu1) ... Setting up liblockfile-bin (1.16-1.1) ... Setting up perl-modules-5.30 (5.30.0-9) ... Setting up libsqlite3-0:amd64 (3.30.1-1ubuntu1) ... Setting up binutils-common:amd64 (2.33.1-6ubuntu3) ... Setting up linux-libc-dev:amd64 (5.3.0-24.26) ... Setting up libgomp1:amd64 (9.2.1-21ubuntu1) ... Setting up bzip2 (1.0.8-2) ... Setting up libcap2:amd64 (1:2.27-1) ... Setting up libasan5:amd64 (9.2.1-21ubuntu1) ... Setting up libncurses6:amd64 (6.1+20191019-1ubuntu1) ... Setting up libquadmath0:amd64 (9.2.1-21ubuntu1) ... Setting up libatomic1:amd64 (9.2.1-21ubuntu1) ... Setting up libubsan1:amd64 (9.2.1-21ubuntu1) ... Setting up libdevmapper1.02.1:amd64 (2:1.02.155-2ubuntu7) ... Setting up mount (2.34-0.1ubuntu4) ... Setting up sensible-utils (0.0.12+nmu1) ... Setting up gpgconf (2.2.17-3ubuntu1) ... Setting up libperl5.30:amd64 (5.30.0-9) ... Setting up libisl22:amd64 (0.22-2) ... Setting up liblockfile1:amd64 (1.16-1.1) ... Setting up libjson-c4:amd64 (0.13.1+dfsg-6) ... Setting up libbinutils:amd64 (2.33.1-6ubuntu3) ... Setting up libc-dev-bin (2.30-0ubuntu3) ... Setting up libcc1-0:amd64 (9.2.1-21ubuntu1) ... Setting up gpg (2.2.17-3ubuntu1) ... Setting up liblsan0:amd64 (9.2.1-21ubuntu1) ... Setting up libitm1:amd64 (9.2.1-21ubuntu1) ... Setting up libkmod2:amd64 (26-3ubuntu1) ... Setting up binutils-x86-64-linux-gnu (2.33.1-6ubuntu3) ... Setting up libtsan0:amd64 (9.2.1-21ubuntu1) ... Setting up gpg-agent (2.2.17-3ubuntu1) ... Installing new version of config file /etc/logcheck/ignore.d.server/gpg-agent ... Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent-browser.socket -> /usr/lib/systemd/user/gpg-agent-browser.socket. Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent-extra.socket -> /usr/lib/systemd/user/gpg-agent-extra.socket. Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent-ssh.socket -> /usr/lib/systemd/user/gpg-agent-ssh.socket. Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent.socket -> /usr/lib/systemd/user/gpg-agent.socket. Setting up binutils (2.33.1-6ubuntu3) ... Setting up libgcc-9-dev:amd64 (9.2.1-21ubuntu1) ... Setting up perl (5.30.0-9) ... Setting up cpp-9 (9.2.1-21ubuntu1) ... Setting up libc6-dev:amd64 (2.30-0ubuntu3) ... Setting up libcryptsetup12:amd64 (2:2.2.2-1ubuntu1) ... Setting up gcc-9 (9.2.1-21ubuntu1) ... Setting up libstdc++-9-dev:amd64 (9.2.1-21ubuntu1) ... Setting up systemd (244-3ubuntu1) ... Installing new version of config file /etc/dhcp/dhclient-enter-hooks.d/resolved ... Installing new version of config file /etc/systemd/networkd.conf ... Installing new version of config file /etc/systemd/system.conf ... Installing new version of config file /etc/systemd/user.conf ... Initializing machine ID from KVM UUID. Setting up g++-9 (9.2.1-21ubuntu1) ... Setting up systemd-sysv (244-3ubuntu1) ... Processing triggers for libc-bin (2.30-0ubuntu3) ... RUN: /usr/share/launchpad-buildd/bin/sbuild-package PACKAGEBUILD-18344617 amd64 focal -c chroot:build-PACKAGEBUILD-18344617 --arch=amd64 --dist=focal --nolog -A python-uvicorn_0.3.24-1.dsc Initiating build PACKAGEBUILD-18344617 with 4 jobs across 4 processor cores. Kernel reported to sbuild: 4.4.0-170-generic #199-Ubuntu SMP Thu Nov 14 01:45:04 UTC 2019 x86_64 sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on lcy01-amd64-011.buildd +==============================================================================+ | python-uvicorn 0.3.24-1 (amd64) 05 Jan 2020 10:15 | +==============================================================================+ Package: python-uvicorn Version: 0.3.24-1 Source Version: 0.3.24-1 Distribution: focal Machine Architecture: amd64 Host Architecture: amd64 Build Architecture: amd64 I: NOTICE: Log filtering will replace 'build/python-uvicorn-Vhsera/python-uvicorn-0.3.24' with '<>' I: NOTICE: Log filtering will replace 'build/python-uvicorn-Vhsera' with '<>' I: NOTICE: Log filtering will replace 'home/buildd/build-PACKAGEBUILD-18344617/chroot-autobuild' with '<>' +------------------------------------------------------------------------------+ | Fetch source files | +------------------------------------------------------------------------------+ Local sources ------------- python-uvicorn_0.3.24-1.dsc exists in .; copying to chroot Check architectures ------------------- Check dependencies ------------------ Merged Build-Depends: build-essential, fakeroot Filtered Build-Depends: build-essential, fakeroot dpkg-deb: building package 'sbuild-build-depends-core-dummy' in '/<>/resolver-2hD7Xh/apt_archive/sbuild-build-depends-core-dummy.deb'. Ign:1 copy:/<>/resolver-2hD7Xh/apt_archive ./ InRelease Get:2 copy:/<>/resolver-2hD7Xh/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-2hD7Xh/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-2hD7Xh/apt_archive ./ Sources [214 B] Get:5 copy:/<>/resolver-2hD7Xh/apt_archive ./ Packages [528 B] Fetched 2861 B in 0s (0 B/s) Reading package lists... Reading package lists... +------------------------------------------------------------------------------+ | Install core build dependencies (apt-based resolver) | +------------------------------------------------------------------------------+ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: libhogweed4 libisl21 libnettle6 libperl5.28 perl-modules-5.28 Use 'apt autoremove' to remove them. The following NEW packages will be installed: sbuild-build-depends-core-dummy 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 852 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 copy:/<>/resolver-2hD7Xh/apt_archive ./ sbuild-build-depends-core-dummy 0.invalid.0 [852 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 852 B in 0s (0 B/s) Selecting previously unselected package sbuild-build-depends-core-dummy. (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../sbuild-build-depends-core-dummy_0.invalid.0_amd64.deb ... Unpacking sbuild-build-depends-core-dummy (0.invalid.0) ... Setting up sbuild-build-depends-core-dummy (0.invalid.0) ... Merged Build-Depends: debhelper (>= 12), dh-python, docbook-to-man, mkdocs (>= 1.0.4), python3-all, python3-click, python3-h11, python3-httptools, python3-pytest, python3-requests, python3-setuptools, python3-uvloop, python3-websockets, python3-wsproto Filtered Build-Depends: debhelper (>= 12), dh-python, docbook-to-man, mkdocs (>= 1.0.4), python3-all, python3-click, python3-h11, python3-httptools, python3-pytest, python3-requests, python3-setuptools, python3-uvloop, python3-websockets, python3-wsproto dpkg-deb: building package 'sbuild-build-depends-python-uvicorn-dummy' in '/<>/resolver-wCe05o/apt_archive/sbuild-build-depends-python-uvicorn-dummy.deb'. Ign:1 copy:/<>/resolver-wCe05o/apt_archive ./ InRelease Get:2 copy:/<>/resolver-wCe05o/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-wCe05o/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-wCe05o/apt_archive ./ Sources [295 B] Get:5 copy:/<>/resolver-wCe05o/apt_archive ./ Packages [616 B] Fetched 3030 B in 0s (0 B/s) Reading package lists... Reading package lists... +------------------------------------------------------------------------------+ | Install python-uvicorn build dependencies (apt-based resolver) | +------------------------------------------------------------------------------+ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: libhogweed4 libisl21 libnettle6 libperl5.28 perl-modules-5.28 Use 'apt autoremove' to remove them. The following additional packages will be installed: autoconf automake autopoint autotools-dev bsdmainutils debhelper dh-autoreconf dh-python dh-strip-nondeterminism docbook docbook-to-man dwz file fonts-font-awesome fonts-glyphicons-halflings fonts-lato fonts-roboto-slab gettext gettext-base groff-base intltool-debian libarchive-zip-perl libbsd0 libcroco3 libdebhelper-perl libelf1 libexpat1 libfile-stripnondeterminism-perl libglib2.0-0 libhttp-parser2.9 libicu63 libjs-bootstrap libjs-bootswatch libjs-jquery libjs-lunr libjs-modernizr libmagic-mgc libmagic1 libmpdec2 libosp5 libpipeline1 libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib libpython3.8-minimal libpython3.8-stdlib libsigsegv2 libsub-override-perl libtool libuchardet0 libuv1 libxml2 libyaml-0-2 m4 man-db mime-support mkdocs opensp po-debconf python3 python3-all python3-atomicwrites python3-attr python3-certifi python3-chardet python3-click python3-colorama python3-distutils python3-h11 python3-httptools python3-idna python3-importlib-metadata python3-jinja2 python3-lib2to3 python3-livereload python3-markdown python3-markupsafe python3-minimal python3-more-itertools python3-packaging python3-pkg-resources python3-pluggy python3-py python3-pyparsing python3-pytest python3-requests python3-setuptools python3-six python3-tornado python3-urllib3 python3-uvloop python3-wcwidth python3-websockets python3-wsproto python3-yaml python3-zipp python3.7 python3.7-minimal python3.8 python3.8-minimal sgml-base sgml-data sphinx-rtd-theme-common xml-core Suggested packages: autoconf-archive gnu-standards autoconf-doc wamerican | wordlist whois vacation dh-make docbook-defguide docbook-dsssl docbook-xml psgml fonts-roboto gettext-doc libasprintf-dev libgettextpo-dev groff libjs-es5-shim libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc apparmor less www-browser ghp-import mkdocs-doc nodejs doc-base libmail-box-perl python3-doc python3-tk python3-venv python-attr-doc python-jinja2-doc coffeescript node-uglify python-livereload-doc python3-django python3-flask python3-slimmer python-markdown-doc subversion python-pyparsing-doc python3-cryptography python3-openssl python3-socks python-setuptools-doc python3-pycurl python-tornado-doc python3-twisted python3.7-venv python3.7-doc binfmt-support python3.8-venv python3.8-doc sgml-base-doc perlsgml w3-recs libxml2-utils Recommended packages: curl | wget | lynx libarchive-cpio-perl libglib2.0-data shared-mime-info xdg-user-dirs javascript-common libltdl-dev libmail-sendmail-perl node-less python3-pyinotify python3-pygments The following NEW packages will be installed: autoconf automake autopoint autotools-dev bsdmainutils debhelper dh-autoreconf dh-python dh-strip-nondeterminism docbook docbook-to-man dwz file fonts-font-awesome fonts-glyphicons-halflings fonts-lato fonts-roboto-slab gettext gettext-base groff-base intltool-debian libarchive-zip-perl libbsd0 libcroco3 libdebhelper-perl libelf1 libexpat1 libfile-stripnondeterminism-perl libglib2.0-0 libhttp-parser2.9 libicu63 libjs-bootstrap libjs-bootswatch libjs-jquery libjs-lunr libjs-modernizr libmagic-mgc libmagic1 libmpdec2 libosp5 libpipeline1 libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib libpython3.8-minimal libpython3.8-stdlib libsigsegv2 libsub-override-perl libtool libuchardet0 libuv1 libxml2 libyaml-0-2 m4 man-db mime-support mkdocs opensp po-debconf python3 python3-all python3-atomicwrites python3-attr python3-certifi python3-chardet python3-click python3-colorama python3-distutils python3-h11 python3-httptools python3-idna python3-importlib-metadata python3-jinja2 python3-lib2to3 python3-livereload python3-markdown python3-markupsafe python3-minimal python3-more-itertools python3-packaging python3-pkg-resources python3-pluggy python3-py python3-pyparsing python3-pytest python3-requests python3-setuptools python3-six python3-tornado python3-urllib3 python3-uvloop python3-wcwidth python3-websockets python3-wsproto python3-yaml python3-zipp python3.7 python3.7-minimal python3.8 python3.8-minimal sbuild-build-depends-python-uvicorn-dummy sgml-base sgml-data sphinx-rtd-theme-common xml-core 0 upgraded, 105 newly installed, 0 to remove and 0 not upgraded. Need to get 36.3 MB of archives. After this operation, 157 MB of additional disk space will be used. Get:1 copy:/<>/resolver-wCe05o/apt_archive ./ sbuild-build-depends-python-uvicorn-dummy 0.invalid.0 [948 B] Get:2 http://ftpmaster.internal/ubuntu focal/main amd64 libpython3.7-minimal amd64 3.7.5-2 [545 kB] Get:3 http://ftpmaster.internal/ubuntu focal/main amd64 libexpat1 amd64 2.2.9-1 [73.3 kB] Get:4 http://ftpmaster.internal/ubuntu focal/main amd64 python3.7-minimal amd64 3.7.5-2 [1766 kB] Get:5 http://ftpmaster.internal/ubuntu focal/main amd64 python3-minimal amd64 3.7.5-1ubuntu1 [23.3 kB] Get:6 http://ftpmaster.internal/ubuntu focal/main amd64 mime-support all 3.64ubuntu1 [30.6 kB] Get:7 http://ftpmaster.internal/ubuntu focal/main amd64 libmpdec2 amd64 2.4.2-2 [84.1 kB] Get:8 http://ftpmaster.internal/ubuntu focal/main amd64 libpython3.7-stdlib amd64 3.7.5-2 [1732 kB] Get:9 http://ftpmaster.internal/ubuntu focal/main amd64 python3.7 amd64 3.7.5-2 [301 kB] Get:10 http://ftpmaster.internal/ubuntu focal/main amd64 libpython3-stdlib amd64 3.7.5-1ubuntu1 [6844 B] Get:11 http://ftpmaster.internal/ubuntu focal/main amd64 python3 amd64 3.7.5-1ubuntu1 [47.2 kB] Get:12 http://ftpmaster.internal/ubuntu focal/main amd64 libbsd0 amd64 0.10.0-1 [45.4 kB] Get:13 http://ftpmaster.internal/ubuntu focal/main amd64 bsdmainutils amd64 11.1.2ubuntu2 [181 kB] Get:14 http://ftpmaster.internal/ubuntu focal/main amd64 libuchardet0 amd64 0.0.6-3 [64.9 kB] Get:15 http://ftpmaster.internal/ubuntu focal/main amd64 groff-base amd64 1.22.4-4 [865 kB] Get:16 http://ftpmaster.internal/ubuntu focal/main amd64 libpipeline1 amd64 1.5.1-3 [27.4 kB] Get:17 http://ftpmaster.internal/ubuntu focal/main amd64 man-db amd64 2.9.0-2 [1114 kB] Get:18 http://ftpmaster.internal/ubuntu focal/main amd64 fonts-lato all 2.0-2 [2698 kB] Get:19 http://ftpmaster.internal/ubuntu focal/main amd64 libpython3.8-minimal amd64 3.8.0-5 [703 kB] Get:20 http://ftpmaster.internal/ubuntu focal/main amd64 python3.8-minimal amd64 3.8.0-5 [1890 kB] Get:21 http://ftpmaster.internal/ubuntu focal/main amd64 sgml-base all 1.29.1 [12.4 kB] Get:22 http://ftpmaster.internal/ubuntu focal/main amd64 libmagic-mgc amd64 1:5.37-6 [209 kB] Get:23 http://ftpmaster.internal/ubuntu focal/main amd64 libmagic1 amd64 1:5.37-6 [75.3 kB] Get:24 http://ftpmaster.internal/ubuntu focal/main amd64 file amd64 1:5.37-6 [23.2 kB] Get:25 http://ftpmaster.internal/ubuntu focal/main amd64 libelf1 amd64 0.176-1.1 [44.1 kB] Get:26 http://ftpmaster.internal/ubuntu focal/main amd64 libglib2.0-0 amd64 2.63.3-1 [1279 kB] Get:27 http://ftpmaster.internal/ubuntu focal/main amd64 libicu63 amd64 63.2-2 [8294 kB] Get:28 http://ftpmaster.internal/ubuntu focal/main amd64 libxml2 amd64 2.9.4+dfsg1-8ubuntu1 [648 kB] Get:29 http://ftpmaster.internal/ubuntu focal/main amd64 libyaml-0-2 amd64 0.2.2-1 [48.9 kB] Get:30 http://ftpmaster.internal/ubuntu focal/main amd64 python3-pkg-resources all 41.4.0-1 [100 kB] Get:31 http://ftpmaster.internal/ubuntu focal/main amd64 python3-six all 1.12.0-2build1 [11.7 kB] Get:32 http://ftpmaster.internal/ubuntu focal/main amd64 python3-yaml amd64 5.1.2-1build1 [202 kB] Get:33 http://ftpmaster.internal/ubuntu focal/main amd64 gettext-base amd64 0.19.8.1-10 [50.2 kB] Get:34 http://ftpmaster.internal/ubuntu focal/main amd64 libsigsegv2 amd64 2.12-2 [13.9 kB] Get:35 http://ftpmaster.internal/ubuntu focal/main amd64 m4 amd64 1.4.18-4 [199 kB] Get:36 http://ftpmaster.internal/ubuntu focal/main amd64 autoconf all 2.69-11ubuntu1 [321 kB] Get:37 http://ftpmaster.internal/ubuntu focal/main amd64 autotools-dev all 20180224.1 [39.6 kB] Get:38 http://ftpmaster.internal/ubuntu focal/main amd64 automake all 1:1.16.1-4ubuntu3 [522 kB] Get:39 http://ftpmaster.internal/ubuntu focal/main amd64 autopoint all 0.19.8.1-10 [412 kB] Get:40 http://ftpmaster.internal/ubuntu focal/main amd64 libtool all 2.4.6-11 [194 kB] Get:41 http://ftpmaster.internal/ubuntu focal/main amd64 dh-autoreconf all 19 [16.1 kB] Get:42 http://ftpmaster.internal/ubuntu focal/main amd64 libdebhelper-perl all 12.7.1ubuntu1 [52.0 kB] Get:43 http://ftpmaster.internal/ubuntu focal/main amd64 libarchive-zip-perl all 1.67-1 [90.4 kB] Get:44 http://ftpmaster.internal/ubuntu focal/main amd64 libsub-override-perl all 0.09-2 [9532 B] Get:45 http://ftpmaster.internal/ubuntu focal/main amd64 libfile-stripnondeterminism-perl all 1.6.3-1 [16.0 kB] Get:46 http://ftpmaster.internal/ubuntu focal/main amd64 dh-strip-nondeterminism all 1.6.3-1 [5224 B] Get:47 http://ftpmaster.internal/ubuntu focal/main amd64 dwz amd64 0.13-5 [151 kB] Get:48 http://ftpmaster.internal/ubuntu focal/main amd64 libcroco3 amd64 0.6.13-1 [82.5 kB] Get:49 http://ftpmaster.internal/ubuntu focal/main amd64 gettext amd64 0.19.8.1-10 [897 kB] Get:50 http://ftpmaster.internal/ubuntu focal/main amd64 intltool-debian all 0.35.0+20060710.5 [24.9 kB] Get:51 http://ftpmaster.internal/ubuntu focal/main amd64 po-debconf all 1.0.21 [233 kB] Get:52 http://ftpmaster.internal/ubuntu focal/main amd64 debhelper all 12.7.1ubuntu1 [875 kB] Get:53 http://ftpmaster.internal/ubuntu focal/main amd64 python3-lib2to3 all 3.8.0-1 [75.6 kB] Get:54 http://ftpmaster.internal/ubuntu focal/main amd64 python3-distutils all 3.8.0-1 [142 kB] Get:55 http://ftpmaster.internal/ubuntu focal/main amd64 dh-python all 4.20191017ubuntu1 [88.5 kB] Get:56 http://ftpmaster.internal/ubuntu focal/main amd64 xml-core all 0.18+nmu1 [21.6 kB] Get:57 http://ftpmaster.internal/ubuntu focal/universe amd64 sgml-data all 2.0.11 [171 kB] Get:58 http://ftpmaster.internal/ubuntu focal/universe amd64 docbook all 4.5-6 [122 kB] Get:59 http://ftpmaster.internal/ubuntu focal/universe amd64 libosp5 amd64 1.5.2-13ubuntu2 [584 kB] Get:60 http://ftpmaster.internal/ubuntu focal/universe amd64 opensp amd64 1.5.2-13ubuntu2 [143 kB] Get:61 http://ftpmaster.internal/ubuntu focal/universe amd64 docbook-to-man amd64 1:2.0.0-42 [74.1 kB] Get:62 http://ftpmaster.internal/ubuntu focal/main amd64 fonts-font-awesome all 5.0.10+really4.7.0~dfsg-1 [514 kB] Get:63 http://ftpmaster.internal/ubuntu focal/universe amd64 fonts-glyphicons-halflings all 1.009~3.4.1+dfsg-1 [117 kB] Get:64 http://ftpmaster.internal/ubuntu focal/main amd64 fonts-roboto-slab all 1.100263+20170512-2 [166 kB] Get:65 http://ftpmaster.internal/ubuntu focal/universe amd64 libhttp-parser2.9 amd64 2.9.2-2 [21.8 kB] Get:66 http://ftpmaster.internal/ubuntu focal/universe amd64 libjs-bootstrap all 3.4.1+dfsg-1 [124 kB] Get:67 http://ftpmaster.internal/ubuntu focal/main amd64 libjs-jquery all 3.3.1~dfsg-3 [329 kB] Get:68 http://ftpmaster.internal/ubuntu focal/universe amd64 libjs-lunr all 2.3.7~dfsg-1 [47.7 kB] Get:69 http://ftpmaster.internal/ubuntu focal/main amd64 libpython3.8-stdlib amd64 3.8.0-5 [1663 kB] Get:70 http://ftpmaster.internal/ubuntu focal/main amd64 libuv1 amd64 1.33.1-2 [80.1 kB] Get:71 http://ftpmaster.internal/ubuntu focal/universe amd64 libjs-bootswatch all 3.3.7+dfsg2-1 [133 kB] Get:72 http://ftpmaster.internal/ubuntu focal/main amd64 libjs-modernizr all 2.6.2+ds1-3ubuntu1 [46.2 kB] Get:73 http://ftpmaster.internal/ubuntu focal/main amd64 sphinx-rtd-theme-common all 0.4.3+dfsg-1 [1019 kB] Get:74 http://ftpmaster.internal/ubuntu focal/main amd64 python3-colorama all 0.3.7-1 [14.9 kB] Get:75 http://ftpmaster.internal/ubuntu focal/main amd64 python3-click all 7.0-2 [64.8 kB] Get:76 http://ftpmaster.internal/ubuntu focal/main amd64 python3-markupsafe amd64 1.1.0-1build1 [14.5 kB] Get:77 http://ftpmaster.internal/ubuntu focal/main amd64 python3-jinja2 all 2.10-2ubuntu2 [95.5 kB] Get:78 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-tornado amd64 5.1.1-4ubuntu5 [304 kB] Get:79 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-livereload all 2.6.1-3 [23.8 kB] Get:80 http://ftpmaster.internal/ubuntu focal/main amd64 python3-attr all 18.2.0-1build1 [29.7 kB] Get:81 http://ftpmaster.internal/ubuntu focal/main amd64 python3-pyparsing all 2.4.2-1 [58.8 kB] Get:82 http://ftpmaster.internal/ubuntu focal/main amd64 python3-packaging all 19.1-2 [21.7 kB] Get:83 http://ftpmaster.internal/ubuntu focal/main amd64 python3-markdown all 3.1.1-2build1 [59.3 kB] Get:84 http://ftpmaster.internal/ubuntu focal/universe amd64 mkdocs all 1.0.4+dfsg-1 [57.3 kB] Get:85 http://ftpmaster.internal/ubuntu focal/main amd64 python3.8 amd64 3.8.0-5 [355 kB] Get:86 http://ftpmaster.internal/ubuntu focal/main amd64 python3-all amd64 3.7.5-1ubuntu1 [1120 B] Get:87 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-atomicwrites all 1.1.5-2build1 [7016 B] Get:88 http://ftpmaster.internal/ubuntu focal/main amd64 python3-certifi all 2019.11.28-1 [149 kB] Get:89 http://ftpmaster.internal/ubuntu focal/main amd64 python3-chardet all 3.0.4-4 [80.6 kB] Get:90 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-h11 all 0.8.1-2 [46.3 kB] Get:91 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-httptools amd64 0.0.11-1.1build1 [50.5 kB] Get:92 http://ftpmaster.internal/ubuntu focal/main amd64 python3-idna all 2.6-2build1 [32.8 kB] Get:93 http://ftpmaster.internal/ubuntu focal/main amd64 python3-more-itertools all 4.2.0-1build1 [39.4 kB] Get:94 http://ftpmaster.internal/ubuntu focal/main amd64 python3-zipp all 0.6.0-1 [5260 B] Get:95 http://ftpmaster.internal/ubuntu focal/main amd64 python3-importlib-metadata all 0.23-2ubuntu1 [9492 B] Get:96 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-pluggy all 0.13.0-2 [18.4 kB] Get:97 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-py all 1.8.0-1 [65.3 kB] Get:98 http://ftpmaster.internal/ubuntu focal/main amd64 python3-wcwidth all 0.1.7+dfsg1-6build1 [15.4 kB] Get:99 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-pytest all 4.6.6-1ubuntu4 [177 kB] Get:100 http://ftpmaster.internal/ubuntu focal/main amd64 python3-urllib3 all 1.24.1-1ubuntu2 [83.9 kB] Get:101 http://ftpmaster.internal/ubuntu focal/main amd64 python3-requests all 2.21.0-1 [46.8 kB] Get:102 http://ftpmaster.internal/ubuntu focal/main amd64 python3-setuptools all 41.4.0-1 [255 kB] Get:103 http://ftpmaster.internal/ubuntu focal/main amd64 python3-uvloop amd64 0.14.0+ds1-1 [1060 kB] Get:104 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-websockets all 8.1-1 [47.7 kB] Get:105 http://ftpmaster.internal/ubuntu focal/universe amd64 python3-wsproto all 0.15.0-2 [22.4 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 36.3 MB in 1s (69.6 MB/s) Selecting previously unselected package libpython3.7-minimal:amd64. (Reading database ... 14652 files and directories currently installed.) Preparing to unpack .../libpython3.7-minimal_3.7.5-2_amd64.deb ... Unpacking libpython3.7-minimal:amd64 (3.7.5-2) ... Selecting previously unselected package libexpat1:amd64. Preparing to unpack .../libexpat1_2.2.9-1_amd64.deb ... Unpacking libexpat1:amd64 (2.2.9-1) ... Selecting previously unselected package python3.7-minimal. Preparing to unpack .../python3.7-minimal_3.7.5-2_amd64.deb ... Unpacking python3.7-minimal (3.7.5-2) ... Setting up libpython3.7-minimal:amd64 (3.7.5-2) ... Setting up libexpat1:amd64 (2.2.9-1) ... Setting up python3.7-minimal (3.7.5-2) ... Selecting previously unselected package python3-minimal. (Reading database ... 14901 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.7.5-1ubuntu1_amd64.deb ... Unpacking python3-minimal (3.7.5-1ubuntu1) ... Selecting previously unselected package mime-support. Preparing to unpack .../1-mime-support_3.64ubuntu1_all.deb ... Unpacking mime-support (3.64ubuntu1) ... Selecting previously unselected package libmpdec2:amd64. Preparing to unpack .../2-libmpdec2_2.4.2-2_amd64.deb ... Unpacking libmpdec2:amd64 (2.4.2-2) ... Selecting previously unselected package libpython3.7-stdlib:amd64. Preparing to unpack .../3-libpython3.7-stdlib_3.7.5-2_amd64.deb ... Unpacking libpython3.7-stdlib:amd64 (3.7.5-2) ... Selecting previously unselected package python3.7. Preparing to unpack .../4-python3.7_3.7.5-2_amd64.deb ... Unpacking python3.7 (3.7.5-2) ... Selecting previously unselected package libpython3-stdlib:amd64. Preparing to unpack .../5-libpython3-stdlib_3.7.5-1ubuntu1_amd64.deb ... Unpacking libpython3-stdlib:amd64 (3.7.5-1ubuntu1) ... Setting up python3-minimal (3.7.5-1ubuntu1) ... Selecting previously unselected package python3. (Reading database ... 15339 files and directories currently installed.) Preparing to unpack .../00-python3_3.7.5-1ubuntu1_amd64.deb ... Unpacking python3 (3.7.5-1ubuntu1) ... Selecting previously unselected package libbsd0:amd64. Preparing to unpack .../01-libbsd0_0.10.0-1_amd64.deb ... Unpacking libbsd0:amd64 (0.10.0-1) ... Selecting previously unselected package bsdmainutils. Preparing to unpack .../02-bsdmainutils_11.1.2ubuntu2_amd64.deb ... Unpacking bsdmainutils (11.1.2ubuntu2) ... Selecting previously unselected package libuchardet0:amd64. Preparing to unpack .../03-libuchardet0_0.0.6-3_amd64.deb ... Unpacking libuchardet0:amd64 (0.0.6-3) ... Selecting previously unselected package groff-base. Preparing to unpack .../04-groff-base_1.22.4-4_amd64.deb ... Unpacking groff-base (1.22.4-4) ... Selecting previously unselected package libpipeline1:amd64. Preparing to unpack .../05-libpipeline1_1.5.1-3_amd64.deb ... Unpacking libpipeline1:amd64 (1.5.1-3) ... Selecting previously unselected package man-db. Preparing to unpack .../06-man-db_2.9.0-2_amd64.deb ... Unpacking man-db (2.9.0-2) ... Selecting previously unselected package fonts-lato. Preparing to unpack .../07-fonts-lato_2.0-2_all.deb ... Unpacking fonts-lato (2.0-2) ... Selecting previously unselected package libpython3.8-minimal:amd64. Preparing to unpack .../08-libpython3.8-minimal_3.8.0-5_amd64.deb ... Unpacking libpython3.8-minimal:amd64 (3.8.0-5) ... Selecting previously unselected package python3.8-minimal. Preparing to unpack .../09-python3.8-minimal_3.8.0-5_amd64.deb ... Unpacking python3.8-minimal (3.8.0-5) ... Selecting previously unselected package sgml-base. Preparing to unpack .../10-sgml-base_1.29.1_all.deb ... Unpacking sgml-base (1.29.1) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../11-libmagic-mgc_1%3a5.37-6_amd64.deb ... Unpacking libmagic-mgc (1:5.37-6) ... Selecting previously unselected package libmagic1:amd64. Preparing to unpack .../12-libmagic1_1%3a5.37-6_amd64.deb ... Unpacking libmagic1:amd64 (1:5.37-6) ... Selecting previously unselected package file. Preparing to unpack .../13-file_1%3a5.37-6_amd64.deb ... Unpacking file (1:5.37-6) ... Selecting previously unselected package libelf1:amd64. Preparing to unpack .../14-libelf1_0.176-1.1_amd64.deb ... Unpacking libelf1:amd64 (0.176-1.1) ... Selecting previously unselected package libglib2.0-0:amd64. Preparing to unpack .../15-libglib2.0-0_2.63.3-1_amd64.deb ... Unpacking libglib2.0-0:amd64 (2.63.3-1) ... Selecting previously unselected package libicu63:amd64. Preparing to unpack .../16-libicu63_63.2-2_amd64.deb ... Unpacking libicu63:amd64 (63.2-2) ... Selecting previously unselected package libxml2:amd64. Preparing to unpack .../17-libxml2_2.9.4+dfsg1-8ubuntu1_amd64.deb ... Unpacking libxml2:amd64 (2.9.4+dfsg1-8ubuntu1) ... Selecting previously unselected package libyaml-0-2:amd64. Preparing to unpack .../18-libyaml-0-2_0.2.2-1_amd64.deb ... Unpacking libyaml-0-2:amd64 (0.2.2-1) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../19-python3-pkg-resources_41.4.0-1_all.deb ... Unpacking python3-pkg-resources (41.4.0-1) ... Selecting previously unselected package python3-six. Preparing to unpack .../20-python3-six_1.12.0-2build1_all.deb ... Unpacking python3-six (1.12.0-2build1) ... Selecting previously unselected package python3-yaml. Preparing to unpack .../21-python3-yaml_5.1.2-1build1_amd64.deb ... Unpacking python3-yaml (5.1.2-1build1) ... Selecting previously unselected package gettext-base. Preparing to unpack .../22-gettext-base_0.19.8.1-10_amd64.deb ... Unpacking gettext-base (0.19.8.1-10) ... Selecting previously unselected package libsigsegv2:amd64. Preparing to unpack .../23-libsigsegv2_2.12-2_amd64.deb ... Unpacking libsigsegv2:amd64 (2.12-2) ... Selecting previously unselected package m4. Preparing to unpack .../24-m4_1.4.18-4_amd64.deb ... Unpacking m4 (1.4.18-4) ... Selecting previously unselected package autoconf. Preparing to unpack .../25-autoconf_2.69-11ubuntu1_all.deb ... Unpacking autoconf (2.69-11ubuntu1) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../26-autotools-dev_20180224.1_all.deb ... Unpacking autotools-dev (20180224.1) ... Selecting previously unselected package automake. Preparing to unpack .../27-automake_1%3a1.16.1-4ubuntu3_all.deb ... Unpacking automake (1:1.16.1-4ubuntu3) ... Selecting previously unselected package autopoint. Preparing to unpack .../28-autopoint_0.19.8.1-10_all.deb ... Unpacking autopoint (0.19.8.1-10) ... Selecting previously unselected package libtool. Preparing to unpack .../29-libtool_2.4.6-11_all.deb ... Unpacking libtool (2.4.6-11) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../30-dh-autoreconf_19_all.deb ... Unpacking dh-autoreconf (19) ... Selecting previously unselected package libdebhelper-perl. Preparing to unpack .../31-libdebhelper-perl_12.7.1ubuntu1_all.deb ... Unpacking libdebhelper-perl (12.7.1ubuntu1) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../32-libarchive-zip-perl_1.67-1_all.deb ... Unpacking libarchive-zip-perl (1.67-1) ... Selecting previously unselected package libsub-override-perl. Preparing to unpack .../33-libsub-override-perl_0.09-2_all.deb ... Unpacking libsub-override-perl (0.09-2) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../34-libfile-stripnondeterminism-perl_1.6.3-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.6.3-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../35-dh-strip-nondeterminism_1.6.3-1_all.deb ... Unpacking dh-strip-nondeterminism (1.6.3-1) ... Selecting previously unselected package dwz. Preparing to unpack .../36-dwz_0.13-5_amd64.deb ... Unpacking dwz (0.13-5) ... Selecting previously unselected package libcroco3:amd64. Preparing to unpack .../37-libcroco3_0.6.13-1_amd64.deb ... Unpacking libcroco3:amd64 (0.6.13-1) ... Selecting previously unselected package gettext. Preparing to unpack .../38-gettext_0.19.8.1-10_amd64.deb ... Unpacking gettext (0.19.8.1-10) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../39-intltool-debian_0.35.0+20060710.5_all.deb ... Unpacking intltool-debian (0.35.0+20060710.5) ... Selecting previously unselected package po-debconf. Preparing to unpack .../40-po-debconf_1.0.21_all.deb ... Unpacking po-debconf (1.0.21) ... Selecting previously unselected package debhelper. Preparing to unpack .../41-debhelper_12.7.1ubuntu1_all.deb ... Unpacking debhelper (12.7.1ubuntu1) ... Selecting previously unselected package python3-lib2to3. Preparing to unpack .../42-python3-lib2to3_3.8.0-1_all.deb ... Unpacking python3-lib2to3 (3.8.0-1) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../43-python3-distutils_3.8.0-1_all.deb ... Unpacking python3-distutils (3.8.0-1) ... Selecting previously unselected package dh-python. Preparing to unpack .../44-dh-python_4.20191017ubuntu1_all.deb ... Unpacking dh-python (4.20191017ubuntu1) ... Selecting previously unselected package xml-core. Preparing to unpack .../45-xml-core_0.18+nmu1_all.deb ... Unpacking xml-core (0.18+nmu1) ... Selecting previously unselected package sgml-data. Preparing to unpack .../46-sgml-data_2.0.11_all.deb ... Unpacking sgml-data (2.0.11) ... Selecting previously unselected package docbook. Preparing to unpack .../47-docbook_4.5-6_all.deb ... Unpacking docbook (4.5-6) ... Selecting previously unselected package libosp5. Preparing to unpack .../48-libosp5_1.5.2-13ubuntu2_amd64.deb ... Unpacking libosp5 (1.5.2-13ubuntu2) ... Selecting previously unselected package opensp. Preparing to unpack .../49-opensp_1.5.2-13ubuntu2_amd64.deb ... Unpacking opensp (1.5.2-13ubuntu2) ... Selecting previously unselected package docbook-to-man. Preparing to unpack .../50-docbook-to-man_1%3a2.0.0-42_amd64.deb ... Unpacking docbook-to-man (1:2.0.0-42) ... Selecting previously unselected package fonts-font-awesome. Preparing to unpack .../51-fonts-font-awesome_5.0.10+really4.7.0~dfsg-1_all.deb ... Unpacking fonts-font-awesome (5.0.10+really4.7.0~dfsg-1) ... Selecting previously unselected package fonts-glyphicons-halflings. Preparing to unpack .../52-fonts-glyphicons-halflings_1.009~3.4.1+dfsg-1_all.deb ... Unpacking fonts-glyphicons-halflings (1.009~3.4.1+dfsg-1) ... Selecting previously unselected package fonts-roboto-slab. Preparing to unpack .../53-fonts-roboto-slab_1.100263+20170512-2_all.deb ... Unpacking fonts-roboto-slab (1.100263+20170512-2) ... Selecting previously unselected package libhttp-parser2.9:amd64. Preparing to unpack .../54-libhttp-parser2.9_2.9.2-2_amd64.deb ... Unpacking libhttp-parser2.9:amd64 (2.9.2-2) ... Selecting previously unselected package libjs-bootstrap. Preparing to unpack .../55-libjs-bootstrap_3.4.1+dfsg-1_all.deb ... Unpacking libjs-bootstrap (3.4.1+dfsg-1) ... Selecting previously unselected package libjs-jquery. Preparing to unpack .../56-libjs-jquery_3.3.1~dfsg-3_all.deb ... Unpacking libjs-jquery (3.3.1~dfsg-3) ... Selecting previously unselected package libjs-lunr. Preparing to unpack .../57-libjs-lunr_2.3.7~dfsg-1_all.deb ... Unpacking libjs-lunr (2.3.7~dfsg-1) ... Selecting previously unselected package libpython3.8-stdlib:amd64. Preparing to unpack .../58-libpython3.8-stdlib_3.8.0-5_amd64.deb ... Unpacking libpython3.8-stdlib:amd64 (3.8.0-5) ... Selecting previously unselected package libuv1:amd64. Preparing to unpack .../59-libuv1_1.33.1-2_amd64.deb ... Unpacking libuv1:amd64 (1.33.1-2) ... Selecting previously unselected package libjs-bootswatch. Preparing to unpack .../60-libjs-bootswatch_3.3.7+dfsg2-1_all.deb ... Unpacking libjs-bootswatch (3.3.7+dfsg2-1) ... Selecting previously unselected package libjs-modernizr. Preparing to unpack .../61-libjs-modernizr_2.6.2+ds1-3ubuntu1_all.deb ... Unpacking libjs-modernizr (2.6.2+ds1-3ubuntu1) ... Selecting previously unselected package sphinx-rtd-theme-common. Preparing to unpack .../62-sphinx-rtd-theme-common_0.4.3+dfsg-1_all.deb ... Unpacking sphinx-rtd-theme-common (0.4.3+dfsg-1) ... Selecting previously unselected package python3-colorama. Preparing to unpack .../63-python3-colorama_0.3.7-1_all.deb ... Unpacking python3-colorama (0.3.7-1) ... Selecting previously unselected package python3-click. Preparing to unpack .../64-python3-click_7.0-2_all.deb ... Unpacking python3-click (7.0-2) ... Selecting previously unselected package python3-markupsafe. Preparing to unpack .../65-python3-markupsafe_1.1.0-1build1_amd64.deb ... Unpacking python3-markupsafe (1.1.0-1build1) ... Selecting previously unselected package python3-jinja2. Preparing to unpack .../66-python3-jinja2_2.10-2ubuntu2_all.deb ... Unpacking python3-jinja2 (2.10-2ubuntu2) ... Selecting previously unselected package python3-tornado. Preparing to unpack .../67-python3-tornado_5.1.1-4ubuntu5_amd64.deb ... Unpacking python3-tornado (5.1.1-4ubuntu5) ... Selecting previously unselected package python3-livereload. Preparing to unpack .../68-python3-livereload_2.6.1-3_all.deb ... Unpacking python3-livereload (2.6.1-3) ... Selecting previously unselected package python3-attr. Preparing to unpack .../69-python3-attr_18.2.0-1build1_all.deb ... Unpacking python3-attr (18.2.0-1build1) ... Selecting previously unselected package python3-pyparsing. Preparing to unpack .../70-python3-pyparsing_2.4.2-1_all.deb ... Unpacking python3-pyparsing (2.4.2-1) ... Selecting previously unselected package python3-packaging. Preparing to unpack .../71-python3-packaging_19.1-2_all.deb ... Unpacking python3-packaging (19.1-2) ... Selecting previously unselected package python3-markdown. Preparing to unpack .../72-python3-markdown_3.1.1-2build1_all.deb ... Unpacking python3-markdown (3.1.1-2build1) ... Selecting previously unselected package mkdocs. Preparing to unpack .../73-mkdocs_1.0.4+dfsg-1_all.deb ... Unpacking mkdocs (1.0.4+dfsg-1) ... Selecting previously unselected package python3.8. Preparing to unpack .../74-python3.8_3.8.0-5_amd64.deb ... Unpacking python3.8 (3.8.0-5) ... Selecting previously unselected package python3-all. Preparing to unpack .../75-python3-all_3.7.5-1ubuntu1_amd64.deb ... Unpacking python3-all (3.7.5-1ubuntu1) ... Selecting previously unselected package python3-atomicwrites. Preparing to unpack .../76-python3-atomicwrites_1.1.5-2build1_all.deb ... Unpacking python3-atomicwrites (1.1.5-2build1) ... Selecting previously unselected package python3-certifi. Preparing to unpack .../77-python3-certifi_2019.11.28-1_all.deb ... Unpacking python3-certifi (2019.11.28-1) ... Selecting previously unselected package python3-chardet. Preparing to unpack .../78-python3-chardet_3.0.4-4_all.deb ... Unpacking python3-chardet (3.0.4-4) ... Selecting previously unselected package python3-h11. Preparing to unpack .../79-python3-h11_0.8.1-2_all.deb ... Unpacking python3-h11 (0.8.1-2) ... Selecting previously unselected package python3-httptools. Preparing to unpack .../80-python3-httptools_0.0.11-1.1build1_amd64.deb ... Unpacking python3-httptools (0.0.11-1.1build1) ... Selecting previously unselected package python3-idna. Preparing to unpack .../81-python3-idna_2.6-2build1_all.deb ... Unpacking python3-idna (2.6-2build1) ... Selecting previously unselected package python3-more-itertools. Preparing to unpack .../82-python3-more-itertools_4.2.0-1build1_all.deb ... Unpacking python3-more-itertools (4.2.0-1build1) ... Selecting previously unselected package python3-zipp. Preparing to unpack .../83-python3-zipp_0.6.0-1_all.deb ... Unpacking python3-zipp (0.6.0-1) ... Selecting previously unselected package python3-importlib-metadata. Preparing to unpack .../84-python3-importlib-metadata_0.23-2ubuntu1_all.deb ... Unpacking python3-importlib-metadata (0.23-2ubuntu1) ... Selecting previously unselected package python3-pluggy. Preparing to unpack .../85-python3-pluggy_0.13.0-2_all.deb ... Unpacking python3-pluggy (0.13.0-2) ... Selecting previously unselected package python3-py. Preparing to unpack .../86-python3-py_1.8.0-1_all.deb ... Unpacking python3-py (1.8.0-1) ... Selecting previously unselected package python3-wcwidth. Preparing to unpack .../87-python3-wcwidth_0.1.7+dfsg1-6build1_all.deb ... Unpacking python3-wcwidth (0.1.7+dfsg1-6build1) ... Selecting previously unselected package python3-pytest. Preparing to unpack .../88-python3-pytest_4.6.6-1ubuntu4_all.deb ... Unpacking python3-pytest (4.6.6-1ubuntu4) ... Selecting previously unselected package python3-urllib3. Preparing to unpack .../89-python3-urllib3_1.24.1-1ubuntu2_all.deb ... Unpacking python3-urllib3 (1.24.1-1ubuntu2) ... Selecting previously unselected package python3-requests. Preparing to unpack .../90-python3-requests_2.21.0-1_all.deb ... Unpacking python3-requests (2.21.0-1) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../91-python3-setuptools_41.4.0-1_all.deb ... Unpacking python3-setuptools (41.4.0-1) ... Selecting previously unselected package python3-uvloop. Preparing to unpack .../92-python3-uvloop_0.14.0+ds1-1_amd64.deb ... Unpacking python3-uvloop (0.14.0+ds1-1) ... Selecting previously unselected package python3-websockets. Preparing to unpack .../93-python3-websockets_8.1-1_all.deb ... Unpacking python3-websockets (8.1-1) ... Selecting previously unselected package python3-wsproto. Preparing to unpack .../94-python3-wsproto_0.15.0-2_all.deb ... Unpacking python3-wsproto (0.15.0-2) ... Selecting previously unselected package sbuild-build-depends-python-uvicorn-dummy. Preparing to unpack .../95-sbuild-build-depends-python-uvicorn-dummy_0.invalid.0_amd64.deb ... Unpacking sbuild-build-depends-python-uvicorn-dummy (0.invalid.0) ... Setting up libpipeline1:amd64 (1.5.1-3) ... Setting up libpython3.8-minimal:amd64 (3.8.0-5) ... Setting up fonts-lato (2.0-2) ... Setting up mime-support (3.64ubuntu1) ... Setting up libmagic-mgc (1:5.37-6) ... Setting up libarchive-zip-perl (1.67-1) ... Setting up libyaml-0-2:amd64 (0.2.2-1) ... Setting up libglib2.0-0:amd64 (2.63.3-1) ... No schema files found: doing nothing. Setting up fonts-glyphicons-halflings (1.009~3.4.1+dfsg-1) ... Setting up libjs-lunr (2.3.7~dfsg-1) ... Setting up libdebhelper-perl (12.7.1ubuntu1) ... Setting up libmagic1:amd64 (1:5.37-6) ... Setting up fonts-roboto-slab (1.100263+20170512-2) ... Setting up gettext-base (0.19.8.1-10) ... Setting up file (1:5.37-6) ... Setting up libjs-modernizr (2.6.2+ds1-3ubuntu1) ... Setting up libicu63:amd64 (63.2-2) ... Setting up libosp5 (1.5.2-13ubuntu2) ... Setting up autotools-dev (20180224.1) ... Setting up libuv1:amd64 (1.33.1-2) ... Setting up libjs-bootswatch (3.3.7+dfsg2-1) ... Setting up libsigsegv2:amd64 (2.12-2) ... Setting up autopoint (0.19.8.1-10) ... Setting up python3.8-minimal (3.8.0-5) ... Setting up libuchardet0:amd64 (0.0.6-3) ... Setting up libsub-override-perl (0.09-2) ... Setting up sgml-base (1.29.1) ... Setting up libmpdec2:amd64 (2.4.2-2) ... Setting up libjs-jquery (3.3.1~dfsg-3) ... Setting up libpython3.8-stdlib:amd64 (3.8.0-5) ... Setting up python3.8 (3.8.0-5) ... Setting up libbsd0:amd64 (0.10.0-1) ... Setting up libelf1:amd64 (0.176-1.1) ... Setting up libxml2:amd64 (2.9.4+dfsg1-8ubuntu1) ... Setting up fonts-font-awesome (5.0.10+really4.7.0~dfsg-1) ... Setting up sphinx-rtd-theme-common (0.4.3+dfsg-1) ... Setting up libjs-bootstrap (3.4.1+dfsg-1) ... Setting up libhttp-parser2.9:amd64 (2.9.2-2) ... Setting up libfile-stripnondeterminism-perl (1.6.3-1) ... Setting up libpython3.7-stdlib:amd64 (3.7.5-2) ... Setting up libtool (2.4.6-11) ... Setting up m4 (1.4.18-4) ... Setting up opensp (1.5.2-13ubuntu2) ... Setting up bsdmainutils (11.1.2ubuntu2) ... update-alternatives: using /usr/bin/bsd-write to provide /usr/bin/write (write) in auto mode update-alternatives: using /usr/bin/bsd-from to provide /usr/bin/from (from) in auto mode Setting up libcroco3:amd64 (0.6.13-1) ... Setting up autoconf (2.69-11ubuntu1) ... Setting up dh-strip-nondeterminism (1.6.3-1) ... Setting up dwz (0.13-5) ... Setting up groff-base (1.22.4-4) ... Setting up xml-core (0.18+nmu1) ... Setting up libpython3-stdlib:amd64 (3.7.5-1ubuntu1) ... Setting up automake (1:1.16.1-4ubuntu3) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode Setting up python3.7 (3.7.5-2) ... Setting up gettext (0.19.8.1-10) ... Setting up python3 (3.7.5-1ubuntu1) ... Setting up man-db (2.9.0-2) ... Not building database; man-db/auto-update is not 'true'. Created symlink /etc/systemd/system/timers.target.wants/man-db.timer → /lib/systemd/system/man-db.timer. Setting up python3-markupsafe (1.1.0-1build1) ... Setting up python3-atomicwrites (1.1.5-2build1) ... Setting up intltool-debian (0.35.0+20060710.5) ... Setting up python3-six (1.12.0-2build1) ... Setting up python3-jinja2 (2.10-2ubuntu2) ... Setting up python3-wcwidth (0.1.7+dfsg1-6build1) ... Setting up python3-pyparsing (2.4.2-1) ... Setting up python3-certifi (2019.11.28-1) ... Setting up python3-idna (2.6-2build1) ... Setting up python3-h11 (0.8.1-2) ... Setting up python3-uvloop (0.14.0+ds1-1) ... Setting up python3-urllib3 (1.24.1-1ubuntu2) ... Setting up python3-httptools (0.0.11-1.1build1) ... Setting up python3-lib2to3 (3.8.0-1) ... Setting up python3-websockets (8.1-1) ... Setting up python3-pkg-resources (41.4.0-1) ... Setting up python3-distutils (3.8.0-1) ... Setting up dh-python (4.20191017ubuntu1) ... Setting up python3-more-itertools (4.2.0-1build1) ... Setting up python3-attr (18.2.0-1build1) ... Setting up python3-tornado (5.1.1-4ubuntu5) ... Setting up python3-wsproto (0.15.0-2) ... Setting up python3-setuptools (41.4.0-1) ... Setting up python3-py (1.8.0-1) ... Setting up python3-colorama (0.3.7-1) ... Setting up po-debconf (1.0.21) ... Setting up python3-all (3.7.5-1ubuntu1) ... Setting up python3-yaml (5.1.2-1build1) ... Setting up python3-zipp (0.6.0-1) ... Setting up python3-click (7.0-2) ... Setting up python3-packaging (19.1-2) ... Setting up python3-chardet (3.0.4-4) ... Setting up python3-requests (2.21.0-1) ... Setting up python3-markdown (3.1.1-2build1) ... Setting up python3-livereload (2.6.1-3) ... Setting up mkdocs (1.0.4+dfsg-1) ... Setting up python3-importlib-metadata (0.23-2ubuntu1) ... Setting up python3-pluggy (0.13.0-2) ... Setting up python3-pytest (4.6.6-1ubuntu4) ... Setting up debhelper (12.7.1ubuntu1) ... Setting up dh-autoreconf (19) ... Processing triggers for libc-bin (2.30-0ubuntu3) ... Processing triggers for sgml-base (1.29.1) ... Setting up sgml-data (2.0.11) ... Processing triggers for sgml-base (1.29.1) ... Setting up docbook (4.5-6) ... Processing triggers for sgml-base (1.29.1) ... Setting up docbook-to-man (1:2.0.0-42) ... Setting up sbuild-build-depends-python-uvicorn-dummy (0.invalid.0) ... +------------------------------------------------------------------------------+ | Build environment | +------------------------------------------------------------------------------+ Kernel: Linux 4.4.0-170-generic amd64 (x86_64) Toolchain package versions: binutils_2.33.1-6ubuntu3 dpkg-dev_1.19.7ubuntu2 g++-9_9.2.1-21ubuntu1 gcc-9_9.2.1-21ubuntu1 libc6-dev_2.30-0ubuntu3 libstdc++-9-dev_9.2.1-21ubuntu1 libstdc++6_9.2.1-21ubuntu1 linux-libc-dev_5.3.0-24.26 Package versions: adduser_3.118ubuntu1 advancecomp_2.1-2.1 apt_1.9.5 autoconf_2.69-11ubuntu1 automake_1:1.16.1-4ubuntu3 autopoint_0.19.8.1-10 autotools-dev_20180224.1 base-files_11ubuntu2 base-passwd_3.5.47 bash_5.0-5ubuntu1 binutils_2.33.1-6ubuntu3 binutils-common_2.33.1-6ubuntu3 binutils-x86-64-linux-gnu_2.33.1-6ubuntu3 bsdmainutils_11.1.2ubuntu2 bsdutils_1:2.34-0.1ubuntu4 build-essential_12.8ubuntu1 bzip2_1.0.8-2 ca-certificates_20190110 coreutils_8.30-3ubuntu2 cpp_4:9.2.1-3.1ubuntu1 cpp-9_9.2.1-21ubuntu1 dash_0.5.10.2-6 debconf_1.5.73 debhelper_12.7.1ubuntu1 debianutils_4.9.1 dh-autoreconf_19 dh-python_4.20191017ubuntu1 dh-strip-nondeterminism_1.6.3-1 diffutils_1:3.7-3 docbook_4.5-6 docbook-to-man_1:2.0.0-42 dpkg_1.19.7ubuntu2 dpkg-dev_1.19.7ubuntu2 dwz_0.13-5 e2fsprogs_1.45.3-4ubuntu2 fakeroot_1.24-1 fdisk_2.34-0.1ubuntu4 file_1:5.37-6 findutils_4.6.0+git+20190209-2ubuntu1 fonts-font-awesome_5.0.10+really4.7.0~dfsg-1 fonts-glyphicons-halflings_1.009~3.4.1+dfsg-1 fonts-lato_2.0-2 fonts-roboto-slab_1.100263+20170512-2 g++_4:9.2.1-3.1ubuntu1 g++-9_9.2.1-21ubuntu1 gcc_4:9.2.1-3.1ubuntu1 gcc-9_9.2.1-21ubuntu1 gcc-9-base_9.2.1-21ubuntu1 gettext_0.19.8.1-10 gettext-base_0.19.8.1-10 gpg_2.2.17-3ubuntu1 gpg-agent_2.2.17-3ubuntu1 gpgconf_2.2.17-3ubuntu1 gpgv_2.2.17-3ubuntu1 grep_3.3-1build1 groff-base_1.22.4-4 gzip_1.10-0ubuntu4 hostname_3.23 init_1.57 init-system-helpers_1.57 intltool-debian_0.35.0+20060710.5 libacl1_2.2.53-5ubuntu1 libapparmor1_2.13.3-7ubuntu1 libapt-pkg5.90_1.9.5 libarchive-zip-perl_1.67-1 libargon2-1_0~20171227-0.2 libasan5_9.2.1-21ubuntu1 libassuan0_2.5.3-7ubuntu1 libatomic1_9.2.1-21ubuntu1 libattr1_1:2.4.48-5 libaudit-common_1:2.8.5-2ubuntu5 libaudit1_1:2.8.5-2ubuntu5 libbinutils_2.33.1-6ubuntu3 libblkid1_2.34-0.1ubuntu4 libbsd0_0.10.0-1 libbz2-1.0_1.0.8-2 libc-bin_2.30-0ubuntu3 libc-dev-bin_2.30-0ubuntu3 libc6_2.30-0ubuntu3 libc6-dev_2.30-0ubuntu3 libcap-ng0_0.7.9-2.1 libcap2_1:2.27-1 libcc1-0_9.2.1-21ubuntu1 libcom-err2_1.45.3-4ubuntu2 libcroco3_0.6.13-1 libcryptsetup12_2:2.2.2-1ubuntu1 libdb5.3_5.3.28+dfsg1-0.6ubuntu1 libdebconfclient0_0.250ubuntu2 libdebhelper-perl_12.7.1ubuntu1 libdevmapper1.02.1_2:1.02.155-2ubuntu7 libdpkg-perl_1.19.7ubuntu2 libelf1_0.176-1.1 libexpat1_2.2.9-1 libext2fs2_1.45.3-4ubuntu2 libfakeroot_1.24-1 libfdisk1_2.34-0.1ubuntu4 libffi6_3.2.1-9 libfile-stripnondeterminism-perl_1.6.3-1 libgcc-9-dev_9.2.1-21ubuntu1 libgcc1_1:9.2.1-21ubuntu1 libgcrypt20_1.8.5-3ubuntu1 libgdbm-compat4_1.18.1-5 libgdbm6_1.18.1-5 libglib2.0-0_2.63.3-1 libgmp10_2:6.1.2+dfsg-4 libgnutls30_3.6.11.1-2 libgomp1_9.2.1-21ubuntu1 libgpg-error0_1.36-7 libhogweed4_3.4.1-1 libhogweed5_3.5.1+really3.5.1-2 libhttp-parser2.9_2.9.2-2 libicu63_63.2-2 libidn2-0_2.2.0-2 libip4tc2_1.8.3-2ubuntu5 libisl21_0.21-2 libisl22_0.22-2 libitm1_9.2.1-21ubuntu1 libjs-bootstrap_3.4.1+dfsg-1 libjs-bootswatch_3.3.7+dfsg2-1 libjs-jquery_3.3.1~dfsg-3 libjs-lunr_2.3.7~dfsg-1 libjs-modernizr_2.6.2+ds1-3ubuntu1 libjson-c4_0.13.1+dfsg-6 libkmod2_26-3ubuntu1 liblockfile-bin_1.16-1.1 liblockfile1_1.16-1.1 liblsan0_9.2.1-21ubuntu1 liblz4-1_1.9.2-2 liblzma5_5.2.4-1 libmagic-mgc_1:5.37-6 libmagic1_1:5.37-6 libmount1_2.34-0.1ubuntu4 libmpc3_1.1.0-1 libmpdec2_2.4.2-2 libmpfr6_4.0.2-1 libncurses6_6.1+20191019-1ubuntu1 libncursesw6_6.1+20191019-1ubuntu1 libnettle6_3.4.1-1 libnettle7_3.5.1+really3.5.1-2 libnpth0_1.6-1 libosp5_1.5.2-13ubuntu2 libp11-kit0_0.23.18.1-2 libpam-modules_1.3.1-5ubuntu4 libpam-modules-bin_1.3.1-5ubuntu4 libpam-runtime_1.3.1-5ubuntu4 libpam0g_1.3.1-5ubuntu4 libpcre2-8-0_10.34-7 libpcre3_2:8.39-12 libperl5.28_5.28.1-6build1 libperl5.30_5.30.0-9 libpipeline1_1.5.1-3 libpng16-16_1.6.37-1 libprocps7_2:3.3.15-2ubuntu3 libpython3-stdlib_3.7.5-1ubuntu1 libpython3.7-minimal_3.7.5-2 libpython3.7-stdlib_3.7.5-2 libpython3.8-minimal_3.8.0-5 libpython3.8-stdlib_3.8.0-5 libquadmath0_9.2.1-21ubuntu1 libreadline8_8.0-3 libseccomp2_2.4.2-2ubuntu1 libselinux1_3.0-1 libsemanage-common_3.0-1 libsemanage1_3.0-1 libsepol1_3.0-1 libsigsegv2_2.12-2 libsmartcols1_2.34-0.1ubuntu4 libsqlite3-0_3.30.1-1ubuntu1 libss2_1.45.3-4ubuntu2 libssl1.1_1.1.1c-1ubuntu4 libstdc++-9-dev_9.2.1-21ubuntu1 libstdc++6_9.2.1-21ubuntu1 libsub-override-perl_0.09-2 libsystemd0_244-3ubuntu1 libtasn1-6_4.15.0-2 libtinfo6_6.1+20191019-1ubuntu1 libtool_2.4.6-11 libtsan0_9.2.1-21ubuntu1 libubsan1_9.2.1-21ubuntu1 libuchardet0_0.0.6-3 libudev1_244-3ubuntu1 libunistring2_0.9.10-2 libuuid1_2.34-0.1ubuntu4 libuv1_1.33.1-2 libxml2_2.9.4+dfsg1-8ubuntu1 libyaml-0-2_0.2.2-1 libzstd1_1.4.4+dfsg-1 linux-libc-dev_5.3.0-24.26 lockfile-progs_0.1.18 login_1:4.5-1.1ubuntu4 logsave_1.45.3-4ubuntu2 lsb-base_11.1.0ubuntu2 m4_1.4.18-4 make_4.2.1-1.2 man-db_2.9.0-2 mawk_1.3.3-17ubuntu3 mime-support_3.64ubuntu1 mkdocs_1.0.4+dfsg-1 mount_2.34-0.1ubuntu4 ncurses-base_6.1+20191019-1ubuntu1 ncurses-bin_6.1+20191019-1ubuntu1 opensp_1.5.2-13ubuntu2 openssl_1.1.1c-1ubuntu4 optipng_0.7.7-1 passwd_1:4.5-1.1ubuntu4 patch_2.7.6-6 perl_5.30.0-9 perl-base_5.30.0-9 perl-modules-5.28_5.28.1-6build1 perl-modules-5.30_5.30.0-9 pinentry-curses_1.1.0-3 pkgbinarymangler_144 po-debconf_1.0.21 policyrcd-script-zg2_0.1-3 procps_2:3.3.15-2ubuntu3 python3_3.7.5-1ubuntu1 python3-all_3.7.5-1ubuntu1 python3-atomicwrites_1.1.5-2build1 python3-attr_18.2.0-1build1 python3-certifi_2019.11.28-1 python3-chardet_3.0.4-4 python3-click_7.0-2 python3-colorama_0.3.7-1 python3-distutils_3.8.0-1 python3-h11_0.8.1-2 python3-httptools_0.0.11-1.1build1 python3-idna_2.6-2build1 python3-importlib-metadata_0.23-2ubuntu1 python3-jinja2_2.10-2ubuntu2 python3-lib2to3_3.8.0-1 python3-livereload_2.6.1-3 python3-markdown_3.1.1-2build1 python3-markupsafe_1.1.0-1build1 python3-minimal_3.7.5-1ubuntu1 python3-more-itertools_4.2.0-1build1 python3-packaging_19.1-2 python3-pkg-resources_41.4.0-1 python3-pluggy_0.13.0-2 python3-py_1.8.0-1 python3-pyparsing_2.4.2-1 python3-pytest_4.6.6-1ubuntu4 python3-requests_2.21.0-1 python3-setuptools_41.4.0-1 python3-six_1.12.0-2build1 python3-tornado_5.1.1-4ubuntu5 python3-urllib3_1.24.1-1ubuntu2 python3-uvloop_0.14.0+ds1-1 python3-wcwidth_0.1.7+dfsg1-6build1 python3-websockets_8.1-1 python3-wsproto_0.15.0-2 python3-yaml_5.1.2-1build1 python3-zipp_0.6.0-1 python3.7_3.7.5-2 python3.7-minimal_3.7.5-2 python3.8_3.8.0-5 python3.8-minimal_3.8.0-5 readline-common_8.0-3 sbuild-build-depends-core-dummy_0.invalid.0 sbuild-build-depends-python-uvicorn-dummy_0.invalid.0 sed_4.7-1 sensible-utils_0.0.12+nmu1 sgml-base_1.29.1 sgml-data_2.0.11 sphinx-rtd-theme-common_0.4.3+dfsg-1 systemd_244-3ubuntu1 systemd-sysv_244-3ubuntu1 sysvinit-utils_2.96-1ubuntu1 tar_1.30+dfsg-6 tzdata_2019c-3 ubuntu-keyring_2018.09.18.1 util-linux_2.34-0.1ubuntu4 xml-core_0.18+nmu1 xz-utils_5.2.4-1 zlib1g_1:1.2.11.dfsg-1ubuntu3 +------------------------------------------------------------------------------+ | Build | +------------------------------------------------------------------------------+ Unpack source ------------- gpgv: Signature made Sun Jan 6 16:26:43 2019 UTC gpgv: using RSA key A954A54575BCED49240A725CFFD3C88B997DD16A gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on ./python-uvicorn_0.3.24-1.dsc dpkg-source: info: extracting python-uvicorn in python-uvicorn-0.3.24 dpkg-source: info: unpacking python-uvicorn_0.3.24.orig.tar.gz dpkg-source: info: unpacking python-uvicorn_0.3.24-1.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying 0001-Disable-material-theme-for-mkdocs-use-default-one.patch dpkg-source: info: applying 0002-Use-local-copy-of-uvicorn-logo.patch Check disc space ---------------- Sufficient free space for build User Environment ---------------- APT_CONFIG=/var/lib/sbuild/apt.conf DEB_BUILD_OPTIONS=noautodbgsym parallel=4 HOME=/sbuild-nonexistent LANG=C.UTF-8 LC_ALL=C.UTF-8 LOGNAME=buildd PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games SCHROOT_ALIAS_NAME=build-PACKAGEBUILD-18344617 SCHROOT_CHROOT_NAME=build-PACKAGEBUILD-18344617 SCHROOT_COMMAND=env SCHROOT_GID=2501 SCHROOT_GROUP=buildd SCHROOT_SESSION_ID=build-PACKAGEBUILD-18344617 SCHROOT_UID=2001 SCHROOT_USER=buildd SHELL=/bin/sh TERM=unknown USER=buildd V=1 dpkg-buildpackage ----------------- dpkg-buildpackage: info: source package python-uvicorn dpkg-buildpackage: info: source version 0.3.24-1 dpkg-buildpackage: info: source distribution unstable dpkg-source --before-build . dpkg-buildpackage: info: host architecture amd64 fakeroot debian/rules clean dh clean --with mkdocs,python3 --buildsystem=pybuild dh_auto_clean -O--buildsystem=pybuild I: pybuild base:217: python3.8 setup.py clean running clean removing '/<>/.pybuild/cpython3_3.8/build' (and everything under it) 'build/bdist.linux-amd64' does not exist -- can't clean it 'build/scripts-3.8' does not exist -- can't clean it I: pybuild base:217: python3.7 setup.py clean running clean removing '/<>/.pybuild/cpython3_3.7/build' (and everything under it) 'build/bdist.linux-amd64' does not exist -- can't clean it 'build/scripts-3.7' does not exist -- can't clean it dh_autoreconf_clean -O--buildsystem=pybuild debian/rules override_dh_clean make[1]: Entering directory '/<>' rm -rf html dh_clean make[1]: Leaving directory '/<>' debian/rules build dh build --with mkdocs,python3 --buildsystem=pybuild dh_update_autotools_config -O--buildsystem=pybuild dh_autoreconf -O--buildsystem=pybuild dh_auto_configure -O--buildsystem=pybuild I: pybuild base:217: python3.8 setup.py config running config I: pybuild base:217: python3.7 setup.py config running config debian/rules override_dh_auto_build make[1]: Entering directory '/<>' dh_auto_build I: pybuild base:217: /usr/bin/python3.8 setup.py build running build running build_py creating /<>/.pybuild/cpython3_3.8/build/uvicorn copying uvicorn/importer.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn copying uvicorn/workers.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn copying uvicorn/__init__.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn copying uvicorn/main.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn copying uvicorn/lifespan.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn creating /<>/.pybuild/cpython3_3.8/build/uvicorn/loops copying uvicorn/loops/uvloop.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/loops copying uvicorn/loops/auto.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/loops copying uvicorn/loops/__init__.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/loops copying uvicorn/loops/asyncio.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/loops creating /<>/.pybuild/cpython3_3.8/build/uvicorn/reloaders copying uvicorn/reloaders/statreload.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/reloaders copying uvicorn/reloaders/__init__.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/reloaders creating /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols copying uvicorn/protocols/utils.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols copying uvicorn/protocols/__init__.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols creating /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets copying uvicorn/protocols/websockets/auto.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets copying uvicorn/protocols/websockets/websockets_impl.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets copying uvicorn/protocols/websockets/__init__.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets copying uvicorn/protocols/websockets/wsproto_impl.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets creating /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http copying uvicorn/protocols/http/auto.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http copying uvicorn/protocols/http/httptools_impl.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http copying uvicorn/protocols/http/__init__.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http copying uvicorn/protocols/http/h11_impl.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http creating /<>/.pybuild/cpython3_3.8/build/uvicorn/middleware copying uvicorn/middleware/debug.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/middleware copying uvicorn/middleware/__init__.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/middleware copying uvicorn/middleware/message_logger.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/middleware copying uvicorn/middleware/proxy_headers.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/middleware copying uvicorn/middleware/wsgi.py -> /<>/.pybuild/cpython3_3.8/build/uvicorn/middleware I: pybuild base:217: /usr/bin/python3 setup.py build running build running build_py creating /<>/.pybuild/cpython3_3.7/build/uvicorn copying uvicorn/importer.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn copying uvicorn/workers.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn copying uvicorn/__init__.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn copying uvicorn/main.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn copying uvicorn/lifespan.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn creating /<>/.pybuild/cpython3_3.7/build/uvicorn/loops copying uvicorn/loops/uvloop.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/loops copying uvicorn/loops/auto.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/loops copying uvicorn/loops/__init__.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/loops copying uvicorn/loops/asyncio.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/loops creating /<>/.pybuild/cpython3_3.7/build/uvicorn/reloaders copying uvicorn/reloaders/statreload.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/reloaders copying uvicorn/reloaders/__init__.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/reloaders creating /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols copying uvicorn/protocols/utils.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols copying uvicorn/protocols/__init__.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols creating /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/websockets copying uvicorn/protocols/websockets/auto.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/websockets copying uvicorn/protocols/websockets/websockets_impl.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/websockets copying uvicorn/protocols/websockets/__init__.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/websockets copying uvicorn/protocols/websockets/wsproto_impl.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/websockets creating /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/http copying uvicorn/protocols/http/auto.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/http copying uvicorn/protocols/http/httptools_impl.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/http copying uvicorn/protocols/http/__init__.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/http copying uvicorn/protocols/http/h11_impl.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/protocols/http creating /<>/.pybuild/cpython3_3.7/build/uvicorn/middleware copying uvicorn/middleware/debug.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/middleware copying uvicorn/middleware/__init__.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/middleware copying uvicorn/middleware/message_logger.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/middleware copying uvicorn/middleware/proxy_headers.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/middleware copying uvicorn/middleware/wsgi.py -> /<>/.pybuild/cpython3_3.7/build/uvicorn/middleware LC_ALL=C.UTF-8 LANG=C.UTF-8 mkdocs build && mv site html WARNING - Config value: 'pages'. Warning: The 'pages' configuration option has been deprecated and will be removed in a future release of MkDocs. Use 'nav' instead. INFO - Cleaning site directory INFO - Building documentation to directory: /<>/site make[1]: Leaving directory '/<>' dh_auto_test -O--buildsystem=pybuild I: pybuild pybuild:272: cp -r /<>/tests /<>/.pybuild/cpython3_3.8/build I: pybuild base:217: cd /<>/.pybuild/cpython3_3.8/build; python3.8 -m pytest -k 'not test_run and not test_invalid_upgrade' ============================= test session starts ============================== platform linux -- Python 3.8.0+, pytest-4.6.6, py-1.8.0, pluggy-0.13.0 rootdir: /<> collected 127 items / 3 deselected / 124 selected tests/test_auto_detection.py .. [ 1%] tests/test_lifespan.py .. [ 3%] tests/importer/test_importer.py ...... [ 8%] tests/middleware/test_debug.py ..... [ 12%] tests/middleware/test_message_logger.py ... [ 14%] tests/middleware/test_proxy_headers.py .. [ 16%] tests/middleware/test_wsgi.py .... [ 19%] tests/protocols/test_http.py ........................................... [ 54%] .....................FF [ 72%] tests/protocols/test_utils.py .. [ 74%] tests/protocols/test_websocket.py FF..FFFFFFFFFFFF.Task was destroyed but it is pending! task: wait_for=()]>> F.Task was destroyed but it is pending! task: wait_for=()]>> FFFFFFFFFFFFF [100%] =================================== FAILURES =================================== ______________ test_supported_upgrade_request[HttpToolsProtocol] _______________ self = data = b'GET / HTTP/1.1\r\nHost: example.org\r\nConnection: upgrade\r\nUpgrade: websocket\r\n\r\n' def data_received(self, data): if self.timeout_keep_alive_task is not None: self.timeout_keep_alive_task.cancel() self.timeout_keep_alive_task = None try: > self.parser.feed_data(data) uvicorn/protocols/http/httptools_impl.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E httptools.parser.errors.HttpParserUpgrade: 78 httptools/parser/parser.pyx:196: HttpParserUpgrade During handling of the above exception, another exception occurred: protocol_cls = @pytest.mark.parametrize("protocol_cls", [HttpToolsProtocol, H11Protocol]) def test_supported_upgrade_request(protocol_cls): def app(scope): return Response("Hello, world", media_type="text/plain") protocol = get_connected_protocol(app, protocol_cls, ws_protocol_class=WSProtocol) > protocol.data_received(UPGRADE_REQUEST) tests/protocols/test_http.py:651: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvicorn/protocols/http/httptools_impl.py:175: in data_received self.handle_upgrade() uvicorn/protocols/http/httptools_impl.py:204: in handle_upgrade protocol = self.ws_protocol_class( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = app = .app at 0x7fea0be0ce50> connections = set(), tasks = set() loop = logger = def __init__(self, app, connections=None, tasks=None, loop=None, logger=None): self.app = app self.root_path = '' self.connections = set() if connections is None else connections self.tasks = set() if tasks is None else tasks self.loop = loop or asyncio.get_event_loop() self.logger = logger or logging.getLogger("uvicorn") # Connection state self.transport = None self.server = None self.client = None self.scheme = None # WebSocket state self.connect_event = None self.queue = asyncio.Queue() self.handshake_complete = False self.close_sent = False > self.conn = wsproto.connection.WSConnection( conn_type=wsproto.connection.SERVER, extensions=[wsproto.extensions.PerMessageDeflate()], ) E AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' uvicorn/protocols/websockets/wsproto_impl.py:32: AttributeError _________________ test_supported_upgrade_request[H11Protocol] __________________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [HttpToolsProtocol, H11Protocol]) def test_supported_upgrade_request(protocol_cls): def app(scope): return Response("Hello, world", media_type="text/plain") protocol = get_connected_protocol(app, protocol_cls, ws_protocol_class=WSProtocol) > protocol.data_received(UPGRADE_REQUEST) tests/protocols/test_http.py:651: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvicorn/protocols/http/h11_impl.py:173: in data_received self.handle_events() uvicorn/protocols/http/h11_impl.py:218: in handle_events self.handle_upgrade(event) uvicorn/protocols/http/h11_impl.py:293: in handle_upgrade protocol = self.ws_protocol_class( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = app = .app at 0x7fea0be57af0> connections = set(), tasks = set() loop = logger = def __init__(self, app, connections=None, tasks=None, loop=None, logger=None): self.app = app self.root_path = '' self.connections = set() if connections is None else connections self.tasks = set() if tasks is None else tasks self.loop = loop or asyncio.get_event_loop() self.logger = logger or logging.getLogger("uvicorn") # Connection state self.transport = None self.server = None self.client = None self.scheme = None # WebSocket state self.connect_event = None self.queue = asyncio.Queue() self.handshake_complete = False self.close_sent = False > self.conn = wsproto.connection.WSConnection( conn_type=wsproto.connection.SERVER, extensions=[wsproto.extensions.PerMessageDeflate()], ) E AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' uvicorn/protocols/websockets/wsproto_impl.py:32: AttributeError __________________ test_accept_connection[WebSocketProtocol] ___________________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_accept_connection(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) async def open_connection(url): async with websockets.connect(url) as websocket: return websocket.open with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > is_open = loop.run_until_complete(open_connection(url)) tests/protocols/test_websocket.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:83: in open_connection async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=44370, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 21, in __call__ message = await receive() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 222, in asgi_receive data = await self.recv() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 493, in recv [pop_message_waiter, self.transfer_data_task], AttributeError: 'WebSocketProtocol' object has no attribute 'transfer_data_task' ______________________ test_accept_connection[WSProtocol] ______________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_accept_connection(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) async def open_connection(url): async with websockets.connect(url) as websocket: return websocket.open with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > is_open = loop.run_until_complete(open_connection(url)) tests/protocols/test_websocket.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:83: in open_connection async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' _______________ test_send_text_data_to_client[WebSocketProtocol] _______________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_text_data_to_client(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) await self.send({"type": "websocket.send", "text": "123"}) async def get_data(url): async with websockets.connect(url) as websocket: return await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > data = loop.run_until_complete(get_data(url)) tests/protocols/test_websocket.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:121: in get_data async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=45269, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 25, in __call__ await handler(message) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 118, in websocket_connect await self.send({"type": "websocket.send", "text": "123"}) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 198, in asgi_send await self.send(data) File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 555, in send await self.ensure_open() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 803, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason __________________ test_send_text_data_to_client[WSProtocol] ___________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_text_data_to_client(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) await self.send({"type": "websocket.send", "text": "123"}) async def get_data(url): async with websockets.connect(url) as websocket: return await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > data = loop.run_until_complete(get_data(url)) tests/protocols/test_websocket.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:121: in get_data async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' ______________ test_send_binary_data_to_client[WebSocketProtocol] ______________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_binary_data_to_client(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) await self.send({"type": "websocket.send", "bytes": b"123"}) async def get_data(url): async with websockets.connect(url) as websocket: return await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > data = loop.run_until_complete(get_data(url)) tests/protocols/test_websocket.py:144: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:139: in get_data async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=38432, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 25, in __call__ await handler(message) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 136, in websocket_connect await self.send({"type": "websocket.send", "bytes": b"123"}) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 198, in asgi_send await self.send(data) File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 555, in send await self.ensure_open() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 803, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason _________________ test_send_binary_data_to_client[WSProtocol] __________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_binary_data_to_client(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) await self.send({"type": "websocket.send", "bytes": b"123"}) async def get_data(url): async with websockets.connect(url) as websocket: return await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > data = loop.run_until_complete(get_data(url)) tests/protocols/test_websocket.py:144: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:139: in get_data async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' ______________ test_send_and_close_connection[WebSocketProtocol] _______________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_and_close_connection(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) await self.send({"type": "websocket.send", "text": "123"}) await self.send({"type": "websocket.close"}) async def get_data(url): async with websockets.connect(url) as websocket: data = await websocket.recv() is_open = True try: await websocket.recv() except: is_open = False return (data, is_open) with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > (data, is_open) = loop.run_until_complete(get_data(url)) tests/protocols/test_websocket.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:158: in get_data async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=41723, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 25, in __call__ await handler(message) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 154, in websocket_connect await self.send({"type": "websocket.send", "text": "123"}) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 198, in asgi_send await self.send(data) File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 555, in send await self.ensure_open() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 803, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason __________________ test_send_and_close_connection[WSProtocol] __________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_and_close_connection(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) await self.send({"type": "websocket.send", "text": "123"}) await self.send({"type": "websocket.close"}) async def get_data(url): async with websockets.connect(url) as websocket: data = await websocket.recv() is_open = True try: await websocket.recv() except: is_open = False return (data, is_open) with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > (data, is_open) = loop.run_until_complete(get_data(url)) tests/protocols/test_websocket.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:158: in get_data async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' _______________ test_send_text_data_to_server[WebSocketProtocol] _______________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_text_data_to_server(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) async def websocket_receive(self, message): _text = message.get("text") await self.send({"type": "websocket.send", "text": _text}) async def send_text(url): async with websockets.connect(url) as websocket: await websocket.send("abc") return await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > data = loop.run_until_complete(send_text(url)) tests/protocols/test_websocket.py:192: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:186: in send_text async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=38320, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 21, in __call__ message = await receive() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 222, in asgi_receive data = await self.recv() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 493, in recv [pop_message_waiter, self.transfer_data_task], AttributeError: 'WebSocketProtocol' object has no attribute 'transfer_data_task' __________________ test_send_text_data_to_server[WSProtocol] ___________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_text_data_to_server(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) async def websocket_receive(self, message): _text = message.get("text") await self.send({"type": "websocket.send", "text": _text}) async def send_text(url): async with websockets.connect(url) as websocket: await websocket.send("abc") return await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > data = loop.run_until_complete(send_text(url)) tests/protocols/test_websocket.py:192: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:186: in send_text async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' ______________ test_send_binary_data_to_server[WebSocketProtocol] ______________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_binary_data_to_server(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) async def websocket_receive(self, message): _bytes = message.get("bytes") await self.send({"type": "websocket.send", "bytes": _bytes}) async def send_text(url): async with websockets.connect(url) as websocket: await websocket.send(b"abc") return await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > data = loop.run_until_complete(send_text(url)) tests/protocols/test_websocket.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:208: in send_text async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=40914, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 21, in __call__ message = await receive() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 222, in asgi_receive data = await self.recv() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 493, in recv [pop_message_waiter, self.transfer_data_task], AttributeError: 'WebSocketProtocol' object has no attribute 'transfer_data_task' _________________ test_send_binary_data_to_server[WSProtocol] __________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_binary_data_to_server(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) async def websocket_receive(self, message): _bytes = message.get("bytes") await self.send({"type": "websocket.send", "bytes": _bytes}) async def send_text(url): async with websockets.connect(url) as websocket: await websocket.send(b"abc") return await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > data = loop.run_until_complete(send_text(url)) tests/protocols/test_websocket.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:208: in send_text async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' ______________ test_send_after_protocol_close[WebSocketProtocol] _______________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_after_protocol_close(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) await self.send({"type": "websocket.send", "text": "123"}) await self.send({"type": "websocket.close"}) with pytest.raises(Exception): await self.send({"type": "websocket.send", "text": "123"}) async def get_data(url): async with websockets.connect(url) as websocket: data = await websocket.recv() is_open = True try: await websocket.recv() except: is_open = False return (data, is_open) with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > (data, is_open) = loop.run_until_complete(get_data(url)) tests/protocols/test_websocket.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:230: in get_data async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=37376, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 25, in __call__ await handler(message) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 224, in websocket_connect await self.send({"type": "websocket.send", "text": "123"}) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 198, in asgi_send await self.send(data) File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 555, in send await self.ensure_open() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 803, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason __________________ test_send_after_protocol_close[WSProtocol] __________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_after_protocol_close(protocol_cls): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept"}) await self.send({"type": "websocket.send", "text": "123"}) await self.send({"type": "websocket.close"}) with pytest.raises(Exception): await self.send({"type": "websocket.send", "text": "123"}) async def get_data(url): async with websockets.connect(url) as websocket: data = await websocket.recv() is_open = True try: await websocket.recv() except: is_open = False return (data, is_open) with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > (data, is_open) = loop.run_until_complete(get_data(url)) tests/protocols/test_websocket.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:230: in get_data async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' ______________________ test_missing_handshake[WSProtocol] ______________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_missing_handshake(protocol_cls): class App: def __init__(self, scope): pass async def __call__(self, receive, send): pass async def connect(url): await websockets.connect(url) with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() with pytest.raises(websockets.exceptions.InvalidStatusCode) as exc: > loop.run_until_complete(connect(url)) tests/protocols/test_websocket.py:261: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:256: in connect await websockets.connect(url) /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' ____________________ test_send_before_handshake[WSProtocol] ____________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_send_before_handshake(protocol_cls): class App: def __init__(self, scope): pass async def __call__(self, receive, send): await send({"type": "websocket.send", "text": "123"}) async def connect(url): await websockets.connect(url) with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() with pytest.raises(websockets.exceptions.InvalidStatusCode) as exc: > loop.run_until_complete(connect(url)) tests/protocols/test_websocket.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:275: in connect await websockets.connect(url) /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' _________________ test_duplicate_handshake[WebSocketProtocol] __________________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_duplicate_handshake(protocol_cls): class App: def __init__(self, scope): pass async def __call__(self, receive, send): await send({"type": "websocket.accept"}) await send({"type": "websocket.accept"}) async def connect(url): async with websockets.connect(url) as websocket: data = await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() with pytest.raises(websockets.exceptions.ConnectionClosed) as exc: > loop.run_until_complete(connect(url)) tests/protocols/test_websocket.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:295: in connect async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=41792, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 292, in __call__ await send({"type": "websocket.accept"}) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 207, in asgi_send raise RuntimeError(msg % message_type) RuntimeError: Expected ASGI message 'websocket.send' or 'websocket.close', but got 'websocket.accept'. _____________________ test_duplicate_handshake[WSProtocol] _____________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_duplicate_handshake(protocol_cls): class App: def __init__(self, scope): pass async def __call__(self, receive, send): await send({"type": "websocket.accept"}) await send({"type": "websocket.accept"}) async def connect(url): async with websockets.connect(url) as websocket: data = await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() with pytest.raises(websockets.exceptions.ConnectionClosed) as exc: > loop.run_until_complete(connect(url)) tests/protocols/test_websocket.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:295: in connect async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' __________________ test_asgi_return_value[WebSocketProtocol] ___________________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_asgi_return_value(protocol_cls): """ The ASGI callable should return 'None'. If it doesn't make sure that the connection is closed with an error condition. """ class App: def __init__(self, scope): pass async def __call__(self, receive, send): await send({"type": "websocket.accept"}) return 123 async def connect(url): async with websockets.connect(url) as websocket: data = await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() with pytest.raises(websockets.exceptions.ConnectionClosed) as exc: > loop.run_until_complete(connect(url)) tests/protocols/test_websocket.py:326: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:320: in connect async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=43079, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- ERROR uvicorn:websockets_impl.py:159 ASGI callable should return None, but returned '123'. WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ______________________ test_asgi_return_value[WSProtocol] ______________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_asgi_return_value(protocol_cls): """ The ASGI callable should return 'None'. If it doesn't make sure that the connection is closed with an error condition. """ class App: def __init__(self, scope): pass async def __call__(self, receive, send): await send({"type": "websocket.accept"}) return 123 async def connect(url): async with websockets.connect(url) as websocket: data = await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() with pytest.raises(websockets.exceptions.ConnectionClosed) as exc: > loop.run_until_complete(connect(url)) tests/protocols/test_websocket.py:326: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:320: in connect async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' ______________________ test_app_close[WebSocketProtocol] _______________________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_app_close(protocol_cls): class App: def __init__(self, scope): pass async def __call__(self, receive, send): while True: message = await receive() if message['type'] == 'websocket.connect': await send({"type": "websocket.accept"}) elif message['type'] == 'websocket.receive': await send({"type": "websocket.close"}) elif message['type'] == 'websocket.disconnect': break async def websocket_session(url): async with websockets.connect(url) as websocket: await websocket.ping() await websocket.send('abc') await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() with pytest.raises(websockets.exceptions.ConnectionClosed) as exc: > loop.run_until_complete(websocket_session(url)) tests/protocols/test_websocket.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:348: in websocket_session async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=46092, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 339, in __call__ message = await receive() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 222, in asgi_receive data = await self.recv() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 493, in recv [pop_message_waiter, self.transfer_data_task], AttributeError: 'WebSocketProtocol' object has no attribute 'transfer_data_task' __________________________ test_app_close[WSProtocol] __________________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_app_close(protocol_cls): class App: def __init__(self, scope): pass async def __call__(self, receive, send): while True: message = await receive() if message['type'] == 'websocket.connect': await send({"type": "websocket.accept"}) elif message['type'] == 'websocket.receive': await send({"type": "websocket.close"}) elif message['type'] == 'websocket.disconnect': break async def websocket_session(url): async with websockets.connect(url) as websocket: await websocket.ping() await websocket.send('abc') await websocket.recv() with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() with pytest.raises(websockets.exceptions.ConnectionClosed) as exc: > loop.run_until_complete(websocket_session(url)) tests/protocols/test_websocket.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:348: in websocket_session async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' _____________________ test_client_close[WebSocketProtocol] _____________________ protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_client_close(protocol_cls): class App: def __init__(self, scope): pass async def __call__(self, receive, send): while True: message = await receive() if message['type'] == 'websocket.connect': await send({"type": "websocket.accept"}) elif message['type'] == 'websocket.receive': pass elif message['type'] == 'websocket.disconnect': break async def websocket_session(url): async with websockets.connect(url) as websocket: await websocket.ping() await websocket.send('abc') with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > loop.run_until_complete(websocket_session(url)) tests/protocols/test_websocket.py:384: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:378: in websocket_session async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=45127, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = None, extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 369, in __call__ message = await receive() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 222, in asgi_receive data = await self.recv() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 493, in recv [pop_message_waiter, self.transfer_data_task], AttributeError: 'WebSocketProtocol' object has no attribute 'transfer_data_task' ________________________ test_client_close[WSProtocol] _________________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) def test_client_close(protocol_cls): class App: def __init__(self, scope): pass async def __call__(self, receive, send): while True: message = await receive() if message['type'] == 'websocket.connect': await send({"type": "websocket.accept"}) elif message['type'] == 'websocket.receive': pass elif message['type'] == 'websocket.disconnect': break async def websocket_session(url): async with websockets.connect(url) as websocket: await websocket.ping() await websocket.send('abc') with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > loop.run_until_complete(websocket_session(url)) tests/protocols/test_websocket.py:384: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:378: in websocket_session async with websockets.connect(url) as websocket: /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' _________________ test_subprotocols[proto1-WebSocketProtocol] __________________ protocol_cls = subprotocol = 'proto1' @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) @pytest.mark.parametrize("subprotocol", ["proto1", "proto2"]) def test_subprotocols(protocol_cls, subprotocol): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept", "subprotocol": subprotocol}) async def get_subprotocol(url): async with websockets.connect( url, subprotocols=["proto1", "proto2"] ) as websocket: return websocket.subprotocol with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > accepted_subprotocol = loop.run_until_complete(get_subprotocol(url)) tests/protocols/test_websocket.py:403: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:396: in get_subprotocol async with websockets.connect( /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=39786, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = ['proto1', 'proto2'], extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 21, in __call__ message = await receive() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 222, in asgi_receive data = await self.recv() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 493, in recv [pop_message_waiter, self.transfer_data_task], AttributeError: 'WebSocketProtocol' object has no attribute 'transfer_data_task' _____________________ test_subprotocols[proto1-WSProtocol] _____________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = subprotocol = 'proto1' @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) @pytest.mark.parametrize("subprotocol", ["proto1", "proto2"]) def test_subprotocols(protocol_cls, subprotocol): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept", "subprotocol": subprotocol}) async def get_subprotocol(url): async with websockets.connect( url, subprotocols=["proto1", "proto2"] ) as websocket: return websocket.subprotocol with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > accepted_subprotocol = loop.run_until_complete(get_subprotocol(url)) tests/protocols/test_websocket.py:403: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:396: in get_subprotocol async with websockets.connect( /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' _________________ test_subprotocols[proto2-WebSocketProtocol] __________________ protocol_cls = subprotocol = 'proto2' @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) @pytest.mark.parametrize("subprotocol", ["proto1", "proto2"]) def test_subprotocols(protocol_cls, subprotocol): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept", "subprotocol": subprotocol}) async def get_subprotocol(url): async with websockets.connect( url, subprotocols=["proto1", "proto2"] ) as websocket: return websocket.subprotocol with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > accepted_subprotocol = loop.run_until_complete(get_subprotocol(url)) tests/protocols/test_websocket.py:403: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:396: in get_subprotocol async with websockets.connect( /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = wsuri = WebSocketURI(secure=False, host='127.0.0.1', port=45157, resource_name='/', user_info=None) origin = None available_extensions = [] available_subprotocols = ['proto1', 'proto2'], extra_headers = None async def handshake( self, wsuri: WebSocketURI, origin: Optional[Origin] = None, available_extensions: Optional[Sequence[ClientExtensionFactory]] = None, available_subprotocols: Optional[Sequence[Subprotocol]] = None, extra_headers: Optional[HeadersLike] = None, ) -> None: """ Perform the client side of the opening handshake. :param origin: sets the Origin HTTP header :param available_extensions: list of supported extensions in the order in which they should be used :param available_subprotocols: list of supported subprotocols in order of decreasing preference :param extra_headers: sets additional HTTP request headers; it must be a :class:`~websockets.http.Headers` instance, a :class:`~collections.abc.Mapping`, or an iterable of ``(name, value)`` pairs :raises ~websockets.exceptions.InvalidHandshake: if the handshake fails """ request_headers = Headers() if wsuri.port == (443 if wsuri.secure else 80): # pragma: no cover request_headers["Host"] = wsuri.host else: request_headers["Host"] = f"{wsuri.host}:{wsuri.port}" if wsuri.user_info: request_headers["Authorization"] = build_authorization_basic( *wsuri.user_info ) if origin is not None: request_headers["Origin"] = origin key = build_request(request_headers) if available_extensions is not None: extensions_header = build_extension( [ (extension_factory.name, extension_factory.get_request_params()) for extension_factory in available_extensions ] ) request_headers["Sec-WebSocket-Extensions"] = extensions_header if available_subprotocols is not None: protocol_header = build_subprotocol(available_subprotocols) request_headers["Sec-WebSocket-Protocol"] = protocol_header if extra_headers is not None: if isinstance(extra_headers, Headers): extra_headers = extra_headers.raw_items() elif isinstance(extra_headers, collections.abc.Mapping): extra_headers = extra_headers.items() for name, value in extra_headers: request_headers[name] = value request_headers.setdefault("User-Agent", USER_AGENT) self.write_http_request(wsuri.resource_name, request_headers) status_code, response_headers = await self.read_http_response() if status_code in (301, 302, 303, 307, 308): if "Location" not in response_headers: raise InvalidHeader("Location") raise RedirectHandshake(response_headers["Location"]) elif status_code != 101: > raise InvalidStatusCode(status_code) E websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500 /usr/lib/python3/dist-packages/websockets/client.py:296: InvalidStatusCode ------------------------------ Captured log call ------------------------------- WARNING websockets.server:server.py:169 Error in opening handshake Traceback (most recent call last): File "/usr/lib/python3/dist-packages/websockets/server.py", line 130, in handler path = await self.handshake( File "/usr/lib/python3/dist-packages/websockets/server.py", line 539, in handshake if not self.ws_server.is_serving(): AttributeError: 'Server' object has no attribute 'is_serving' ERROR uvicorn:websockets_impl.py:144 Exception in ASGI application Traceback (most recent call last): File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 140, in run_asgi result = await asgi(self.asgi_receive, self.asgi_send) File "/<>/.pybuild/cpython3_3.8/build/tests/protocols/test_websocket.py", line 21, in __call__ message = await receive() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/websockets_impl.py", line 222, in asgi_receive data = await self.recv() File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 493, in recv [pop_message_waiter, self.transfer_data_task], AttributeError: 'WebSocketProtocol' object has no attribute 'transfer_data_task' _____________________ test_subprotocols[proto2-WSProtocol] _____________________ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: > status_line = await read_line(stream) /usr/lib/python3/dist-packages/websockets/http.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_line(stream: asyncio.StreamReader) -> bytes: """ Read a single line from ``stream``. CRLF is stripped from the return value. """ # Security: this is bounded by the StreamReader's limit (default = 32 KiB). line = await stream.readline() # Security: this guarantees header values are small (hard-coded = 4 KiB) if len(line) > MAX_LINE: raise websockets.exceptions.SecurityError("line too long") # Not mandatory but safe - https://tools.ietf.org/html/rfc7230#section-3.5 if not line.endswith(b"\r\n"): > raise EOFError("line without CRLF") E EOFError: line without CRLF /usr/lib/python3/dist-packages/websockets/http.py:219: EOFError The above exception was the direct cause of the following exception: self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: > status_code, reason, headers = await read_response(self.reader) /usr/lib/python3/dist-packages/websockets/client.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream = > async def read_response(stream: asyncio.StreamReader) -> Tuple[int, str, "Headers"]: """ Read an HTTP/1.1 response and return ``(status_code, reason, headers)``. ``reason`` and ``headers`` are expected to contain only ASCII characters. Other characters are represented with surrogate escapes. :func:`read_request` doesn't attempt to read the response body because WebSocket handshake responses don't have one. If the response contains a body, it may be read from ``stream`` after this coroutine returns. :param stream: input to read the response from :raises EOFError: if the connection is closed without a full HTTP response :raises SecurityError: if the response exceeds a security limit :raises ValueError: if the response isn't well formatted """ # https://tools.ietf.org/html/rfc7230#section-3.1.2 # As in read_request, parsing is simple because a fixed value is expected # for version, status_code is a 3-digit number, and reason can be ignored. try: status_line = await read_line(stream) except EOFError as exc: > raise EOFError("connection closed while reading HTTP status line") from exc E EOFError: connection closed while reading HTTP status line /usr/lib/python3/dist-packages/websockets/http.py:141: EOFError The above exception was the direct cause of the following exception: protocol_cls = subprotocol = 'proto2' @pytest.mark.parametrize("protocol_cls", [WebSocketProtocol, WSProtocol]) @pytest.mark.parametrize("subprotocol", ["proto1", "proto2"]) def test_subprotocols(protocol_cls, subprotocol): class App(WebSocketResponse): async def websocket_connect(self, message): await self.send({"type": "websocket.accept", "subprotocol": subprotocol}) async def get_subprotocol(url): async with websockets.connect( url, subprotocols=["proto1", "proto2"] ) as websocket: return websocket.subprotocol with run_server(App, protocol_cls=protocol_cls) as url: loop = asyncio.new_event_loop() > accepted_subprotocol = loop.run_until_complete(get_subprotocol(url)) tests/protocols/test_websocket.py:403: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete ??? tests/protocols/test_websocket.py:396: in get_subprotocol async with websockets.connect( /usr/lib/python3/dist-packages/websockets/client.py:517: in __aenter__ return await self /usr/lib/python3/dist-packages/websockets/client.py:542: in __await_impl__ await protocol.handshake( /usr/lib/python3/dist-packages/websockets/client.py:290: in handshake status_code, response_headers = await self.read_http_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def read_http_response(self) -> Tuple[int, Headers]: """ Read status line and headers from the HTTP response. If the response contains a body, it may be read from ``self.reader`` after this coroutine returns. :raises ~websockets.exceptions.InvalidMessage: if the HTTP message is malformed or isn't an HTTP/1.1 GET response """ try: status_code, reason, headers = await read_response(self.reader) except Exception as exc: > raise InvalidMessage("did not receive a valid HTTP response") from exc E websockets.exceptions.InvalidMessage: did not receive a valid HTTP response /usr/lib/python3/dist-packages/websockets/client.py:103: InvalidMessage ------------------------------ Captured log call ------------------------------- ERROR asyncio:test_websocket.py:31 Fatal error on transport TCPTransport protocol: transport: Traceback (most recent call last): File "uvloop/handles/stream.pyx", line 829, in uvloop.loop.__uv_stream_on_read_impl File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 173, in data_received self.handle_events() File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 218, in handle_events self.handle_upgrade(event) File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade protocol = self.ws_protocol_class( File "/<>/.pybuild/cpython3_3.8/build/uvicorn/protocols/websockets/wsproto_impl.py", line 32, in __init__ self.conn = wsproto.connection.WSConnection( AttributeError: module 'wsproto.connection' has no attribute 'WSConnection' ============== 30 failed, 94 passed, 3 deselected in 2.05 seconds ============== E: pybuild pybuild:341: test: plugin distutils failed with: exit code=1: cd /<>/.pybuild/cpython3_3.8/build; python3.8 -m pytest -k 'not test_run and not test_invalid_upgrade' dh_auto_test: pybuild --test --test-pytest -i python{version} -p "3.8 3.7" returned exit code 13 make: *** [debian/rules:10: build] Error 255 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 20200105-1015 Finished -------- E: Build failure (dpkg-buildpackage died) +------------------------------------------------------------------------------+ | Cleanup | +------------------------------------------------------------------------------+ Purging /<> Not removing build depends: as requested +------------------------------------------------------------------------------+ | Summary | +------------------------------------------------------------------------------+ Build Architecture: amd64 Build-Space: 4200 Build-Time: 5 Distribution: focal Fail-Stage: build Host Architecture: amd64 Install-Time: 22 Job: python-uvicorn_0.3.24-1.dsc Machine Architecture: amd64 Package: python-uvicorn Package-Time: 29 Source-Version: 0.3.24-1 Space: 4200 Status: attempted Version: 0.3.24-1 -------------------------------------------------------------------------------- Finished at 20200105-1015 Build needed 00:00:29, 4200k disc space RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=chroot --series=focal --arch=amd64 PACKAGEBUILD-18344617 Scanning for processes to kill in build PACKAGEBUILD-18344617